/* ============================================================
   BM.css — Blazemakers Portfolio Stylesheet
   ============================================================ */

/* ---------- RESET & ROOT ---------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --orange:        #F97316;
  --orange-dark:   #D96010;
  --orange-pale:   #FFF5ED;
  --black:         #111111;
  --white:         #FFFFFF;
  --text:          #1A1A1A;
  --muted:         #666666;
  --border:        #EBEBEB;
  --header-h:      68px;
  --max-w:         1100px;
  --radius:        12px;
  --shadow:        0 4px 24px rgba(0, 0, 0, 0.09);
  --shadow-hover:  0 10px 36px rgba(249, 115, 22, 0.22);
  --font:          'Roboto', sans-serif;
  --transition:    0.28s ease;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font);
  background: var(--white);
  color: var(--text);
  line-height: 1.65;
  padding-top: var(--header-h);
}

img {
  display: block;
  max-width: 100%;
}

/* ============================================================
   HEADER
   ============================================================ */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-h);
  background: var(--black);
  z-index: 1000;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.35);
}

.nav-container {
  max-width: var(--max-w);
  margin: 0 auto;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  position: relative;
}

.logo-link { display: flex; align-items: center; }

.logo {
  height: 44px;
  width: auto;
}

/* Nav links */
.nav-links {
  list-style: none;
  display: flex;
  gap: 2.25rem;
}

.nav-links a {
  color: var(--white);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  padding-bottom: 3px;
  position: relative;
  transition: color var(--transition);
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--orange);
  border-radius: 2px;
  transition: width var(--transition);
}

.nav-links a:hover { color: var(--orange); }
.nav-links a:hover::after { width: 100%; }

/* Hamburger button */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  border-radius: 4px;
}

.hamburger span {
  display: block;
  width: 25px;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
  transform-origin: center;
}

/* Hamburger → X animation */
.hamburger.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.active span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hamburger.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  background: linear-gradient(135deg, var(--white) 55%, #FFF0E0 100%);
  border-bottom: 3px solid var(--orange);
  padding: 5.5rem 2rem 4.5rem;
  text-align: center;
}

.hero-content {
  max-width: 680px;
  margin: 0 auto;
}

.hero h1 {
  font-size: clamp(2rem, 5.5vw, 3.6rem);
  font-weight: 900;
  line-height: 1.15;
  color: var(--black);
  margin-bottom: 1.1rem;
  letter-spacing: -0.02em;
}

.hero .highlight { color: var(--orange); }

.hero p {
  font-size: clamp(1rem, 2.2vw, 1.2rem);
  color: var(--muted);
  font-weight: 300;
}

/* ============================================================
   PORTFOLIO SECTION
   ============================================================ */
.portfolio {
  padding: 5rem 2rem;
  max-width: var(--max-w);
  margin: 0 auto;
}

/* Section title — centered with orange underline */
.section-title {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  text-align: center;
  color: var(--black);
  margin-bottom: 2.75rem;
  letter-spacing: -0.01em;
}

.section-title::after {
  content: '';
  display: block;
  width: 52px;
  height: 4px;
  background: var(--orange);
  border-radius: 2px;
  margin: 0.65rem auto 0;
}

.section-title.left-aligned { text-align: left; }
.section-title.left-aligned::after { margin-left: 0; }

/* ---------- GRID: 2 per row, last card centered ---------- */
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
}

/*
  When there are 5 cards (odd total), the last one falls in
  column 1 of the third row. We push it to span both columns
  then constrain its width so it looks like a centred single card.
*/
.portfolio-card--centered {
  grid-column: 1 / -1;
  width: calc(50% - 1rem);   /* same visual width as a 2-col item */
  justify-self: center;
}

/* ---------- CARD ---------- */
.portfolio-card {
  display: block;
  text-decoration: none;
  color: var(--text);
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  transition: transform var(--transition), box-shadow var(--transition);
}

.portfolio-card:hover {
  transform: translateY(-7px);
  box-shadow: var(--shadow-hover);
}

/* ---------- THUMBNAIL — consistent crop ---------- */
.card-image-wrapper {
  width: 100%;
  aspect-ratio: 16 / 9;   /* uniform 16:9 for all cards */
  overflow: hidden;
  background: #F0F0F0;    /* placeholder colour while loading */
}

.card-image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;   /* shows the top of each site — the most relevant part */
  transition: transform 0.45s ease;
}

.portfolio-card:hover .card-image-wrapper img {
  transform: scale(1.06);
}

/* ---------- CARD INFO ---------- */
.card-info {
  padding: 1.2rem 1.5rem 1.4rem;
  border-top: 3px solid var(--orange);
}

.card-info h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--black);
  margin-bottom: 0.3rem;
}

.card-info p {
  font-size: 0.875rem;
  color: var(--muted);
  margin-bottom: 0.75rem;
}

.card-link-label {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--orange);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* ============================================================
   LEARN MORE CTA STRIP
   ============================================================ */
.cta-section {
  background: var(--orange-pale);
  text-align: center;
  padding: 3.5rem 2rem;
  border-top: 1px solid #FFDFC4;
  border-bottom: 1px solid #FFDFC4;
}

.cta-button {
  display: inline-block;
  padding: 1rem 2.6rem;
  background: var(--orange);
  color: var(--white);
  text-decoration: none;
  font-family: var(--font);
  font-size: 1rem;
  font-weight: 700;
  border-radius: 6px;
  letter-spacing: 0.03em;
  transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
  box-shadow: 0 4px 16px rgba(249, 115, 22, 0.35);
}

.cta-button:hover {
  background: var(--orange-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 22px rgba(249, 115, 22, 0.45);
}

.cta-button:active {
  transform: translateY(0);
  box-shadow: 0 2px 10px rgba(249, 115, 22, 0.3);
}

/* ============================================================
   ABOUT SECTION
   ============================================================ */
.about-section {
  padding: 5rem 2rem;
  background: var(--white);
}

.about-inner {
  max-width: var(--max-w);
  margin: 0 auto;
}

.about-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-top: 0.5rem;
}

.about-body p {
  font-size: 1rem;
  color: var(--muted);
  line-height: 1.85;
}

/* ============================================================
   CONTACT SECTION
   ============================================================ */
.contact-section {
  padding: 5rem 2rem;
  background: var(--orange-pale);
  border-top: 1px solid #FFDFC4;
}

.contact-intro {
  text-align: center;
  color: var(--muted);
  font-size: 1rem;
  margin-bottom: 2.5rem;
  margin-top: -1.5rem;
}

.contact-form {
  max-width: 600px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.1rem;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 0.9rem 1.1rem;
  border: 2px solid var(--border);
  border-radius: 6px;
  font-family: var(--font);
  font-size: 0.95rem;
  color: var(--text);
  background: var(--white);
  outline: none;
  transition: border-color var(--transition);
}

.contact-form input:focus,
.contact-form textarea:focus {
  border-color: var(--orange);
}

.contact-form textarea {
  resize: vertical;
  min-height: 130px;
}

.submit-btn {
  align-self: flex-start;
  padding: 0.9rem 2.2rem;
  background: var(--orange);
  color: var(--white);
  border: none;
  border-radius: 6px;
  font-family: var(--font);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: background var(--transition), transform var(--transition);
  box-shadow: 0 4px 14px rgba(249, 115, 22, 0.3);
}

.submit-btn:hover {
  background: var(--orange-dark);
  transform: translateY(-2px);
}

.submit-btn:active { transform: translateY(0); }

.form-success {
  display: none;
  color: #276B30;
  background: #E8F5E9;
  border: 1px solid #A5D6A7;
  border-radius: 6px;
  padding: 0.75rem 1rem;
  font-size: 0.9rem;
  font-weight: 500;
}

.form-success.visible { display: block; }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  background: var(--black);
  color: #888888;
  text-align: center;
  padding: 2rem 1.5rem;
  font-size: 0.85rem;
  letter-spacing: 0.02em;
}

/* ============================================================
   RESPONSIVE — TABLET (≤ 768px)
   ============================================================ */
@media (max-width: 768px) {

  /* Hamburger visible, links dropdown */
  .hamburger { display: flex; }

  .nav-links {
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    background: var(--black);
    flex-direction: column;
    gap: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.32s ease;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
  }

  .nav-links.open { max-height: 180px; }

  .nav-links li a {
    display: block;
    padding: 0.95rem 2rem;
    border-top: 1px solid #222222;
    font-size: 1rem;
  }

  .nav-links a::after { display: none; }

  /* Portfolio: single column */
  .portfolio-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .portfolio-card--centered {
    grid-column: unset;
    width: 100%;
    justify-self: unset;
  }

  /* About: stack paragraphs */
  .about-body {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  /* Contact form: stack name + email */
  .form-row { grid-template-columns: 1fr; }

  .submit-btn { align-self: stretch; text-align: center; }

}

/* ============================================================
   RESPONSIVE — MOBILE (≤ 480px)
   ============================================================ */
@media (max-width: 480px) {

  .nav-container { padding: 0 1.25rem; }

  .logo { height: 38px; }

  .hero { padding: 4rem 1.25rem 3.5rem; }

  .portfolio { padding: 3.5rem 1.25rem; }

  .cta-section { padding: 2.75rem 1.25rem; }

  .cta-button { padding: 0.9rem 1.75rem; font-size: 0.95rem; }

  .about-section,
  .contact-section { padding: 3.5rem 1.25rem; }

}