/* ==========================================================================
   QAGE — Base Theme Variables
   ========================================================================== */
:root{
  --bg:#0b0b0c;
  --panel:#121214;
  --line:#23242a;
  --muted:#a0a0ad;
  --text:#e7e7ee;
  --accent:#10b981;
}

/* ==========================================================================
   Global Resets & Typography
   ========================================================================== */
*{ box-sizing:border-box; }
html, body{ margin:0; height:100%; overflow-x:hidden; } /* prevent horizontal scroll on phones */
html{
  -webkit-text-size-adjust:100%; /* iOS zoom guard */
  text-size-adjust:100%;
}
body{
  font-family: ui-sans-serif,system-ui,-apple-system,"Segoe UI",Roboto,Ubuntu,Cantarell,"Noto Sans",sans-serif;
  background:var(--bg);
  color:var(--text);
}
img{ max-width:100%; height:auto; display:block; } /* responsive images */

/* Layout helper */
.wrap{ max-width:1200px; margin:0 auto; padding:0 24px; }

/* Links */
.link{ color:#9ae6b4; text-decoration:none; margin-left:16px; }
.link:hover{ color:#c4f2d2; }

/* Utility text styles */
.small{ font-size:.9rem; }
.muted{ color:var(--muted); }

/* Buttons */
.btn{
  display:inline-block; padding:12px 18px; border-radius:14px; font-weight:600;
  text-decoration:none; transition:all .15s ease; border:1px solid transparent;
}
.btn-primary{ background:var(--accent); color:#05140f; }
.btn-primary:hover{ filter:brightness(1.05); }
.btn-outline{ border-color:#3a3b42; color:#e8f5ee; background:transparent; }
.btn-outline:hover{ border-color:#4b4d56; }

/* ==========================================================================
   Grid Systems
   ========================================================================== */
.grid-2{ display:grid; grid-template-columns:1fr; gap:24px; }
.grid-3{ display:grid; grid-template-columns:1fr; gap:32px; }
.grid-3 .span-2{ grid-column:span 1; }
.grid-3 .grid-2{ grid-template-columns:repeat(2,minmax(0,1fr)); }

.cards{ display:grid; grid-template-columns:repeat(1,minmax(0,1fr)); gap:24px; }

/* ==========================================================================
   Sections / Cards
   ========================================================================== */
.section{ padding:64px 0; border-top:1px solid var(--line); background:rgba(0,0,0,0.3); }
.section.alt{ background:rgba(20,20,24,0.6); }
.section .card{
  background:rgba(18,18,20,0.65); border:1px solid var(--line);
  border-radius:18px; padding:20px;
}
.eyebrow{ text-transform:uppercase; letter-spacing:.12em; color:#9aa0a6; font-size:.8rem; margin-bottom:8px; }

/* ==========================================================================
   Header / Nav
   ========================================================================== */
/* Mobile-first: allow wrapping and smaller header by default */
.site-header{
  position:sticky; top:0;
  background:rgba(11,11,12,0.8); backdrop-filter:blur(8px);
  border-bottom:1px solid var(--line);
}
.site-header .wrap{
  display:flex; align-items:center; justify-content:space-between;
  flex-wrap:wrap; gap:8px; min-height:56px; padding-block:8px;
}
.logo{ height:28px; } /* mobile size */
.nav{
  display:flex; gap:16px; flex-wrap:wrap;
  overflow-x:auto; -webkit-overflow-scrolling:touch;
}
.nav::-webkit-scrollbar{ display:none; }
.nav a{ color:#b6b7c0; text-decoration:none; font-size:.95rem; }
.nav a:hover{ color:#fff; }

/* ==========================================================================
   Hero
   ========================================================================== */
.hero{
  position:relative; min-height:80vh;
  background:url('assets/background.png') center/cover no-repeat;
  color:white;
}
.hero__overlay{
  position:absolute; inset:0;
  background:linear-gradient(to bottom,rgba(0,0,0,.35),rgba(0,0,0,.65));
}

/* Responsive top padding that grows with screen size.
   clamp(min, preferred, max) keeps the block in view on phones and honors your
   40vh preference on large screens. */
.hero__content{
  padding:clamp(18vh, 30vh + 6vw, 48vh) 0 8vh;
}

/* Very small phones: use Small Viewport Units to avoid URL-bar “vh” bugs */
@media (max-width:480px){
  .hero__content{ padding:22svh 0 8svh; }
}

/* Stack wrapper:
   - Mobile default: flexible column (1fr) so heading can wrap safely.
   - Desktop override below re-introduces max-content to peg <p> to H1’s left. */
.hero__stack{
  width:min(92vw, 680px);
  margin-inline:auto;
  display:grid;
  grid-template-columns:1fr;       /* mobile-first: flexible */
  justify-content:center;
  row-gap:12px;
}

/* Heading: allow wrapping, auto-size, and smart breaking on tiny screens */
.hero__stack h1{
  margin:0;
  text-align:center;
  white-space:normal;              /* allow wrapping on narrow screens */
  font-size:clamp(28px, 8vw, 56px);/* responsive size */
  overflow-wrap:anywhere;          /* break long tokens if needed */
  word-break:normal;
  hyphens:auto;                    /* optional: nicer hyphenation */
}

/* Paragraph: align to left edge of the hero column */
.hero__stack p{
  margin:0; max-width:66ch; text-align:left; justify-self:start;
  font-weight:500; color:#fff;
}

/* Call-to-action row: wrap/stack when narrow */
.cta{ margin-top:18px; display:flex; gap:12px; justify-content:center; flex-wrap:wrap; }
@media (max-width:480px){
  .cta a{ width:100%; text-align:center; }
}

/* ==========================================================================
   Team Cards
   ========================================================================== */
.section-head{ display:flex; align-items:flex-end; justify-content:space-between; }
.cards .person{ display:flex; gap:16px; align-items:flex-start; }
.avatar{
  width:56px; height:56px; border-radius:9999px;
  object-fit:cover;                /* ensure face crops nicely */
  background:linear-gradient(135deg,#5b5f6e,#8b8f9e); /* fallback if no img */
}
.person-name{ font-weight:600; }
.person-title{ color:#b8bdc7; font-size:.95rem; margin-bottom:8px; }

/* ==========================================================================
   Forms
   ========================================================================== */
.form input, .form textarea{
  width:100%; padding:12px 14px;
  background:rgba(18,18,20,0.6); border:1px solid var(--line);
  border-radius:12px; color:var(--text); margin-bottom:12px;
}
#form-status.ok{ color:#9ae6b4; }
#form-status.err{ color:#fca5a5; }
.btn[disabled]{ opacity:.6; pointer-events:none; }

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer{
  border-top:1px solid var(--line);
  padding:22px 0; background:rgba(10,10,12,0.9);
}
.site-footer .wrap{ display:flex; align-items:center; justify-content:space-between; }

/* ==========================================================================
   Responsive Layout Enhancements
   ========================================================================== */
/* Tablets/Desktops: multi-column grids */
@media (min-width:768px){
  .grid-2{ grid-template-columns:repeat(2, minmax(0,1fr)); }
  .grid-3{ grid-template-columns:1fr 2fr; }
  .cards { grid-template-columns:repeat(3, minmax(0,1fr)); }
  .grid-3 .span-2{ grid-column:span 1; }

  /* Header grows a bit on larger screens */
  .site-header .wrap{ min-height:64px; }
  .logo{ height:40px; }
}

/* Desktop+: re-introduce max-content to peg the paragraph to H1's left edge.
   H1 is kept on one line when space allows. */
@media (min-width:769px){
  .hero{ min-height:80vh; background-position:center; }
  .hero__stack{
    grid-template-columns:max-content; /* column width equals H1 width */
  }
  .hero__stack h1{
    white-space:nowrap;                /* single line when there’s room */
  }
}
