/* ============================================================
 * RAY TRUONG PORTFOLIO — Stylesheet
 * ============================================================
 *
 *  1. Design tokens (CSS custom properties)
 *  2. Reset & base
 *  3. Navigation
 *  4. Page system (SPA show/hide)
 *  5. Home — Hero
 *  6. Home — About
 *  7. Home — Work / Projects
 *  8. Home — Signature & Footer
 *  9. Contact page
 * 10. All Projects page
 * 11. Case study shared styles
 *     a. Hero
 *     b. Overview strip
 *     c. Content sections & layout utilities
 *     d. Image components
 *     e. Process list
 *     f. Deliverables grid
 *     g. Pullquote
 *     h. Next project CTA
 *     i. Footer variants
 * 12. Project-specific styles
 *     a. Sterling Custom Homes
 *     b. Kasata Sushi Den
 *     c. Garage Cave
 *     d. Novae Beautique
 * 13. Animation system (page fade, entrance, scroll reveal)
 * 14. Responsive (≤900px)
 * ============================================================ */


/* ── 1. DESIGN TOKENS ──────────────────────────────────────── */
:root {
  --serif:  'DM Serif Display', Georgia, serif;
  --sans:   'DM Sans', system-ui, sans-serif;

  --black:  #0d0d0d;
  --white:  #fafaf8;

  --g100: #f5f4f1;
  --g200: #e8e7e3;
  --g400: #a8a7a2;
  --g700: #4a4a47;

  /* Primary accent — sky blue pulled from the hero photo */
  --accent:     #96D6F5;
  --accent-rgb: 150, 214, 245;

  /* Client brand colors — scoped to project pages only */
  --gold:   #bab279;  /* Sterling Custom Homes  */
  --navy:   #262e38;  /* Sterling Custom Homes  */
  --red:    #9e2a20;  /* Kasata Sushi Den        */
  --orange: #f57c00;  /* Garage Cave             */
  --blush:  #f5ebe9;  /* Novae Beautique         */
  --zagg:   #74b72e;  /* ZAGG display system     */
}


/* ── 2. RESET & BASE ──────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  background: var(--black);
  color: var(--black);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

::selection      { background: var(--navy); color: var(--white); }
::-moz-selection { background: var(--navy); color: var(--white); }


/* ── 3. NAVIGATION ────────────────────────────────────────── */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 200;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 1rem 2rem;
  background: rgba(250, 250, 248, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--g200);
}

.nav-left   { display: flex; align-items: center; justify-content: flex-start; }
.nav-center { display: flex; align-items: center; justify-content: center; }
.nav-right  { display: flex; align-items: center; justify-content: flex-end; }

.nav-logo { display: flex; align-items: center; cursor: pointer; padding: 4px; background: none; border: none; }
.nav-logo svg .st0 { fill: var(--black); }
.nav-logo:hover svg .st0 { fill: var(--accent); }

.nav-burger {
  display: flex;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 6px;
  background: none;
  border: none;
}
.nav-burger span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: var(--g700);
  transition: all 0.25s;
  transform-origin: center;
}
.nav-burger:hover span { background: var(--black); }
.nav-burger.open span:nth-child(1) { transform: translateY(6.5px)  rotate(45deg); }
.nav-burger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-burger.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }
.nav-burger.hidden { display: none; }

.nav-back {
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--g400);
  display: none;
  align-items: center;
  gap: 0.5rem;
  transition: color 0.2s;
  cursor: pointer;
  background: none;
  border: none;
  font-family: var(--sans);
}
.nav-back:hover   { color: var(--black); }
.nav-back.visible { display: flex; }

.nav-contact-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  padding: 6px;
  cursor: pointer;
  color: var(--g700);
  transition: color 0.15s;
}
.nav-contact-btn:hover { color: var(--black); }

.nav-dropdown {
  position: fixed;
  top: 57px;
  left: 0; right: 0;
  background: rgba(250, 250, 248, 0.97);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--g200);
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease, padding 0.35s ease;
  z-index: 199;
}
.nav-dropdown.open { max-height: 280px; padding: 0.5rem 0; }
.nav-dropdown button {
  display: block;
  width: 100%;
  text-align: left;
  padding: 1rem 2.5rem;
  font-size: 0.78rem;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--g700);
  cursor: pointer;
  transition: color 0.15s, padding-left 0.15s;
  border-bottom: 1px solid var(--g200);
  background: none;
  border-top: none;
  border-left: none;
  border-right: none;
  font-family: var(--sans);
}
.nav-dropdown button:last-child { border-bottom: none; }
.nav-dropdown button:hover { color: var(--black); padding-left: 3rem; }


/* ── 4. PAGE SYSTEM ───────────────────────────────────────── */
.page        { display: none; opacity: 0; }
.page.active {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  animation: pageFadeIn 0.6s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
.page.active > footer { margin-top: auto; }
#page-contact.active .contact-body { flex: 1; }


/* ── 5. HERO ──────────────────────────────────────────────── */
.hero {
  height: 100vh;
  min-height: 580px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  background: url('../images/hero-bg.jpg') center / cover no-repeat;
  text-align: center;
  padding: 57px 0 0;
}

.hero-content {
  position: relative;
  z-index: 2;
  width: 90%;
  max-width: 760px;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 57px;
}

.hero-eyebrow {
  font-size: 0.78rem;
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--white);
  margin-bottom: 0.25rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.hero-eyebrow::before,
.hero-eyebrow::after {
  content: '';
  display: block;
  width: 32px;
  height: 1px;
  background: var(--white);
}

.hero-name {
  font-family: var(--serif);
  font-size: clamp(3rem, 10vw, 7rem);
  line-height: 0.87;
  color: var(--accent);
  letter-spacing: -0.02em;
  margin-bottom: 2.25rem;
}
.hero-name em { font-style: italic; color: var(--accent); }

.hero-desc {
  font-size: 1rem;
  font-weight: 300;
  color: rgba(250, 250, 248, 0.45);
  max-width: 510px;
  line-height: 1.75;
  margin-bottom: 2rem;
  text-align: center;
}

.hero-tools { display: flex; gap: 0.75rem; flex-wrap: wrap; justify-content: center; }
.tool-badge {
  padding: 0.4rem 0.9rem;
  border: 1px solid rgba(var(--accent-rgb), 0.3);
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 400;
  letter-spacing: 0.06em;
  color: rgba(var(--accent-rgb), 0.7);
  text-transform: uppercase;
}

.hero-scroll {
  position: absolute;
  right: 3rem;
  bottom: 4.5rem;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}
.hero-scroll span {
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--g400);
  writing-mode: vertical-rl;
}
.scroll-line {
  width: 1px;
  height: 60px;
  background: linear-gradient(to bottom, var(--accent), transparent);
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse { 0%, 100% { opacity: 0.4; } 50% { opacity: 1; } }


/* ── 6. ABOUT ─────────────────────────────────────────────── */
.about { background: var(--g100); padding: 4rem 0; scroll-margin-top: 72px; }
.about-inner { max-width: 1020px; margin: 0 auto; padding: 0 3rem; }


/* ── 7. WORK / PROJECTS ───────────────────────────────────── */
.work { background: var(--g100); padding: 5rem clamp(3rem, 8vw, 8rem); scroll-margin-top: 72px; }
.work-inner { max-width: 1100px; margin: 0 auto; }
.work-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 1.25rem;
}

.projects { display: flex; flex-direction: column; gap: 4rem; width: 100%; }

.project {
  display: grid;
  grid-template-columns: 55% 45%;
  overflow: hidden;
  cursor: pointer;
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.06);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.project:hover { transform: translateY(-4px); box-shadow: 0 12px 36px rgba(0, 0, 0, 0.18); }
.project:nth-child(even) .project-visual { order: -1; }

.project-visual { position: relative; overflow: hidden; min-height: 340px; }
.project-visual-inner {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transition: transform 0.6s ease;
}
.project:hover .project-visual-inner { transform: scale(1.04); }

.project-info {
  padding: 3rem 2.5rem 3rem 3rem;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-self: stretch;
}
.project-number { display: none; }
.project-type {
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}
.project-title {
  font-family: var(--serif);
  font-size: 2rem;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 1.25rem;
}
.project-desc {
  font-size: 0.95rem;
  font-weight: 300;
  color: var(--g700);
  line-height: 1.75;
  margin-bottom: 2rem;
}
.project-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--black);
  letter-spacing: 0.02em;
  border-bottom: 1px solid var(--black);
  padding-bottom: 2px;
  transition: color 0.2s, border-color 0.2s;
  background: none;
  border-left: none;
  border-top: none;
  border-right: none;
  cursor: pointer;
  font-family: var(--sans);
}

/* Project type & link color modifiers */
.c-gold  { color: var(--accent); }
.c-red   { color: var(--red); }
.c-orange { color: var(--orange); }
.c-blush { color: #b07b6b; }

.link-gold   { border-color: var(--black); }
.link-gold:hover   { color: var(--accent);  border-color: var(--accent);  }
.link-red    { border-color: var(--black); }
.link-red:hover    { color: var(--red);     border-color: var(--red);     }
.link-orange { border-color: var(--black); }
.link-orange:hover { color: var(--orange);  border-color: var(--orange);  }
.link-blush  { border-color: var(--black); }
.link-blush:hover  { color: #b07b6b;        border-color: #b07b6b;        }

.more-work-wrap { display: flex; justify-content: center; margin-top: 3rem; }
.more-work-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 2rem;
  border: 1px solid var(--g200);
  border-radius: 2px;
  background: none;
  font-family: var(--sans);
  font-size: 0.8rem;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--g700);
  cursor: pointer;
  transition: all 0.2s;
}
.more-work-btn:hover { border-color: var(--accent); color: var(--accent); }
.more-work-btn svg { transition: transform 0.2s; }
.more-work-btn:hover svg { transform: translateX(4px); }


/* ── 8. SIGNATURE & FOOTER ───────────────────────────────── */
.home-signature {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
  background: var(--white);
  padding: 2.5rem 0;
}
.home-signature + footer {
  opacity: 0;
  transition: opacity 0.75s cubic-bezier(0.22, 1, 0.36, 1) 0.15s;
}
.home-signature.is-visible + footer {
  opacity: 1;
}
.sig-designs-by {
  font-family: 'IM Fell English', Georgia, serif;
  font-size: 0.85rem;
  font-style: italic;
  color: var(--g400);
  letter-spacing: 0.06em;
}
.sig-name {
  font-family: 'Dancing Script', cursive;
  font-size: 1.8rem;
  color: var(--black);
  line-height: 1.1;
}

footer {
  background: var(--black);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 1.5rem 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
footer.footer-split { justify-content: space-between; }
footer p, footer span, footer a {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.35);
  text-decoration: none;
  font-family: var(--sans);
}
footer a:hover, footer span:hover { color: var(--accent); }


/* ── 9. CONTACT PAGE ─────────────────────────────────────── */
.contact-hero {
  height: calc(40vh - 20px);
  min-height: 260px;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: 72px; /* offset fixed nav so centering is within visible area */
  background: linear-gradient(135deg, #0d0d0d 0%, #1a2a3a 100%);
}
.contact-hero-content {
  position: relative;
  z-index: 2;
  padding: 0 4rem;
}
.contact-eyebrow {
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.contact-eyebrow::before {
  content: '';
  display: block;
  width: 24px;
  height: 1px;
  background: var(--accent);
}
.contact-title {
  font-family: var(--serif);
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  color: var(--white);
  letter-spacing: -0.02em;
  line-height: 1.05;
}
.contact-title em { font-style: italic; }

.contact-body {
  background: var(--white);
  padding: 5rem 3rem;
}
.contact-body-inner { max-width: 1020px; margin: 0 auto; }

.contact-cols {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 6rem;
  align-items: start;
}
.contact-info { display: flex; flex-direction: column; }
.contact-info-item {
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--g200);
}
.contact-info-item:first-child { border-top: 1px solid var(--g200); }
.contact-info-label {
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--g400);
  margin-bottom: 0.35rem;
}
.contact-info-val {
  font-size: 0.95rem;
  font-weight: 300;
  color: var(--black);
  line-height: 1.5;
}
.contact-info-val a { color: var(--black); text-decoration: none; border-bottom: 1px solid var(--g200); }
.contact-info-val a:hover { border-color: var(--black); }

.contact-form { display: flex; flex-direction: column; gap: 1rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-group { display: flex; flex-direction: column; gap: 0.4rem; }
.form-group label {
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--g400);
}
.form-group input,
.form-group textarea {
  background: var(--g100);
  border: 1px solid var(--g200);
  border-radius: 2px;
  padding: 0.85rem 1rem;
  font-size: 0.9rem;
  color: var(--black);
  font-family: var(--sans);
  outline: none;
  transition: border-color 0.2s;
  width: 100%;
}
.form-group input::placeholder,
.form-group textarea::placeholder { color: var(--g400); }
.form-group input:focus,
.form-group textarea:focus { border-color: var(--accent); }
.form-group textarea { resize: vertical; min-height: 120px; }

.form-submit {
  margin-top: 0.5rem;
  padding: 1rem;
  background: var(--black);
  color: var(--white);
  border: none;
  border-radius: 2px;
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: opacity 0.2s;
  font-family: var(--sans);
}
.form-submit:hover { opacity: 0.8; }
.form-success {
  display: none;
  text-align: center;
  padding: 1.5rem;
  background: rgba(var(--accent-rgb), 0.08);
  border: 1px solid rgba(var(--accent-rgb), 0.3);
  border-radius: 2px;
  font-size: 0.9rem;
  color: var(--accent);
}


/* ── 10. ALL PROJECTS PAGE ───────────────────────────────── */
.ap-header {
  background: var(--g100);
  padding: 6rem clamp(2rem, 6vw, 6rem) 3rem;
  border-bottom: 1px solid var(--g200);
}
.ap-header-inner { max-width: 1200px; margin: 0 auto; }
.ap-title {
  font-family: var(--serif);
  font-size: clamp(2.5rem, 5vw, 4rem);
  letter-spacing: -0.02em;
  line-height: 1.05;
  margin-bottom: 0.75rem;
}
.ap-subtitle { font-size: 1rem; font-weight: 300; color: var(--g400); }

.ap-grid-wrap { background: var(--white); padding: 4rem clamp(2rem, 6vw, 6rem); }
.ap-grid {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}
.ap-card {
  background: #ffffff;
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.06);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.ap-card:hover { transform: translateY(-6px); box-shadow: 0 8px 28px rgba(0, 0, 0, 0.10); }
.ap-card-img {
  width: 100%;
  height: 200px;
  flex-shrink: 0;
  background-size: cover;
  background-position: center;
  transition: transform 0.45s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.ap-card:hover .ap-card-img { transform: scale(1.04); }
.ap-card-img-empty {
  background: var(--g100);
  display: flex;
  align-items: center;
  justify-content: center;
}
.ap-placeholder-label {
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--g400);
}
.ap-card-placeholder { cursor: default; }
.ap-card-placeholder:hover { transform: none; box-shadow: 0 2px 16px rgba(0, 0, 0, 0.06); }

.ap-card-body {
  padding: 1.25rem 1.25rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  flex: 1;
}
.ap-card-type {
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--g400);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ap-card-title {
  font-family: var(--serif);
  font-size: clamp(1rem, 1.5vw, 1.2rem);
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--black);
}
.ap-card-desc {
  font-size: 0.85rem;
  font-weight: 300;
  color: var(--g700);
  line-height: 1.6;
  margin-top: 0.2rem;
}
.ap-card-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-top: 0.5rem;
  width: fit-content;
}


/* ── 11. CASE STUDY — SHARED STYLES ─────────────────────── */

/* a. Hero */
.cs-hero {
  height: 100vh;
  min-height: 600px;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}
.cs-hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
}
.cs-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(13, 13, 13, 0.90) 0%,
    rgba(13, 13, 13, 0.30) 55%,
    transparent 100%
  );
}
.cs-hero-content {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 1020px;
  margin: 0 auto;
  padding: 0 3rem 4.5rem;
}
.cs-hero-logo {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  pointer-events: none;
}

.cs-eyebrow {
  font-size: 0.75rem;
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.cs-eyebrow::before {
  content: '';
  display: block;
  width: 24px;
  height: 1px;
  background: currentColor;
}
.ey-gold   { color: var(--accent); }
.ey-red    { color: var(--red); }
.ey-orange { color: var(--orange); }
.ey-blush  { color: #c9a27a; }

.cs-title {
  font-family: var(--serif);
  font-size: clamp(2.5rem, 6vw, 5rem);
  color: var(--white);
  letter-spacing: -0.02em;
  line-height: 1.05;
  margin-bottom: 1.5rem;
}
.cs-title em {
  font-style: italic;
  font-size: 0.6em;
  display: block;
  letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.4);
}

.cs-meta {
  display: flex;
  gap: 2.5rem;
  flex-wrap: wrap;
  justify-content: center;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-radius: 12px;
  padding: 1.25rem 2rem;
}
.meta-item    { display: flex; flex-direction: column; gap: 0.2rem; }
.meta-label   { font-size: 0.65rem; letter-spacing: 0.12em; text-transform: uppercase; color: rgba(255, 255, 255, 0.35); }
.meta-val     { font-size: 0.88rem; color: rgba(255, 255, 255, 0.75); font-weight: 300; }

/* b. Overview strip */
.cs-overview {
  padding: 1.6rem 0;
  background: var(--black);
}
.cs-overview .container {
  display: flex;
  justify-content: center;
  align-items: center;
}
.ov-item {
  padding: 0 2.5rem;
  text-align: center;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
}
.ov-item:last-child {
  border-right: none;
}
.ov-label {
  font-size: 0.73rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 0.4rem;
  line-height: 1.3;
  white-space: nowrap;
}
.ov-val {
  font-size: 0.96rem;
  font-weight: 300;
  color: rgba(255, 255, 255, 0.75);
  line-height: 1.5;
  white-space: nowrap;
}

/* c. Content sections & layout utilities */

/* Section wrappers */
.cs-section           { padding: 4rem 0; background: #ffffff; }
.cs-section--tinted   { background: var(--g100); }   /* gray background variant */
.cs-section--flush    { padding-top: 0; }             /* no top padding */
.cs-section--compact  { padding: 3rem 0; }

/* Container — all content lives inside this */
.container            { max-width: 1020px; margin: 0 auto; padding: 0 3rem; }

/* Two-column grid */
.two-col              { display: grid; grid-template-columns: 1fr 1fr; gap: 5rem; align-items: start; }
.two-col--center      { align-items: center; }        /* vertically center both columns */

/* Horizontal rule between sections */
.divider              { border: none; border-top: 1px solid var(--g200); }
.section-rule         { border-top: 1px solid var(--g200); }

/* Shared section label + title + body text */
.section-label {
  font-size: 0.78rem;
  font-weight: 400;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 0.4rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.section-label::before {
  content: '';
  display: block;
  width: 20px;
  height: 1px;
  background: currentColor;
}
.label-gold  { color: var(--accent); }
.label-red   { color: var(--red); }
.label-orange { color: var(--orange); }
.label-blush { color: #c9a27a; }
.label-zagg { color: var(--zagg); }

/* ZAGG case study */
.zagg-hero {
  min-height: 680px;
  background:
    radial-gradient(circle at 50% 42%, rgba(116, 183, 46, 0.18), transparent 30%),
    linear-gradient(145deg, #050505 0%, #111111 45%, #030303 100%);
  justify-content: flex-end;
}
.zagg-hero::after {
  content: '';
  position: absolute;
  inset: auto 0 0;
  z-index: 1;
  height: 36%;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.92), transparent);
  pointer-events: none;
}
.zagg-hero-field {
  position: absolute;
  inset: 0;
  opacity: 0.38;
}
.zagg-hero-field span {
  position: absolute;
  display: block;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.16), transparent);
  animation: zaggScan 8s linear infinite;
}
.zagg-hero-field span:nth-child(1) { top: 22%; left: -20%; width: 42%; height: 1px; }
.zagg-hero-field span:nth-child(2) { top: 64%; right: -18%; width: 34%; height: 1px; animation-delay: 1.8s; }
.zagg-hero-field span:nth-child(3) { top: -12%; left: 28%; width: 1px; height: 46%; animation-delay: 3.2s; }
.zagg-hero-field span:nth-child(4) { bottom: -18%; right: 30%; width: 1px; height: 42%; animation-delay: 4.6s; }
.zagg-hero-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.02em;
  color: var(--white);
  font-family: var(--sans);
  font-size: clamp(4.5rem, 13vw, 11rem);
  font-weight: 800;
  line-height: 0.82;
  letter-spacing: 0;
  text-shadow: 0 0 34px rgba(255, 255, 255, 0.25);
  animation: zaggLogoIn 1.4s cubic-bezier(0.22, 1, 0.36, 1) both, zaggLogoGlow 4.5s ease-in-out 1.2s infinite;
}
.zagg-hero-logo .zagg-a {
  position: relative;
  color: transparent;
  width: 0.76em;
  height: 0.82em;
}
.zagg-hero-logo .zagg-a::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--white);
  clip-path: polygon(0 100%, 20% 100%, 50% 12%, 80% 100%, 100% 100%, 60% 0, 40% 0);
  filter: drop-shadow(0 0 18px rgba(255, 255, 255, 0.18));
}
.zagg-hero-logo .zagg-a::after {
  content: '';
  position: absolute;
  left: 31%;
  top: 37%;
  width: 38%;
  height: 42%;
  background: #ffc223;
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
  filter: drop-shadow(0 0 18px rgba(255, 194, 35, 0.34));
}
.zagg-hero-content {
  z-index: 3;
  max-width: 1120px;
}
.zagg-hero-kicker {
  margin-bottom: 1rem;
  color: var(--zagg);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
}
.zagg-material-grid {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 1.5rem;
  align-items: stretch;
  margin-top: 2rem;
}
.zagg-material-grid > div {
  min-width: 0;
}
.zagg-message-asset,
.zagg-phone-asset {
  object-fit: contain;
  background: #ffffff;
  padding: 2rem;
}
.zagg-message-asset--dark {
  background: #0d0d0d;
}
.zagg-showcase {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
  gap: 2rem;
  align-items: center;
  margin-top: 2.5rem;
}
.zagg-showcase--reverse {
  grid-template-columns: minmax(280px, 0.65fr) minmax(0, 1.35fr);
}
.zagg-showcase--reverse img {
  order: 2;
}
.zagg-showcase-copy {
  padding: 2rem;
  border-left: 3px solid var(--zagg);
  background: #ffffff;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.06);
}
.zagg-showcase-copy span {
  display: block;
  margin-bottom: 0.75rem;
  color: var(--zagg);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
}
.zagg-showcase-copy h3 {
  font-family: var(--serif);
  font-size: clamp(1.45rem, 2vw, 2rem);
  font-weight: 400;
  line-height: 1.12;
  margin-bottom: 1rem;
}
.zagg-showcase-copy p {
  color: var(--g700);
  font-size: 0.92rem;
  font-weight: 300;
  line-height: 1.75;
}
.zagg-template-pair {
  margin-top: 2.5rem;
}
.zagg-asset-pair {
  align-items: center;
}
.zagg-asset-pair .zagg-message-asset {
  height: 220px;
  background: #f4f2ee;
}
.zagg-asset-pair .zagg-phone-asset {
  height: 440px;
  background: #f4f2ee;
}
.zagg-install-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 1rem;
  margin-top: 2rem;
}
.zagg-install-grid img {
  height: 100%;
  min-height: 260px;
}
.zagg-install-grid img:first-child {
  grid-row: span 2;
}

@keyframes zaggLogoIn {
  from {
    opacity: 0;
    transform: scale(0.96);
    filter: blur(10px);
  }
  to {
    opacity: 1;
    transform: scale(1);
    filter: blur(0);
  }
}
@keyframes zaggLogoGlow {
  0%, 100% { text-shadow: 0 0 28px rgba(255, 255, 255, 0.18); }
  50% { text-shadow: 0 0 46px rgba(255, 255, 255, 0.34), 0 0 70px rgba(116, 183, 46, 0.18); }
}
@keyframes zaggScan {
  from { transform: translateX(-18vw); opacity: 0; }
  18%, 60% { opacity: 1; }
  to { transform: translateX(44vw); opacity: 0; }
}

h2.section-title {
  font-family: var(--serif);
  font-size: clamp(1.69rem, 3vw, 2.625rem);
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin-bottom: 1.5rem;
}

p.body {
  font-size: 1rem;
  font-weight: 300;
  color: var(--g700);
  line-height: 1.8;
  margin-bottom: 1.25rem;
}
p.body:last-child { margin-bottom: 0; }

/* d. Image components */
.img-full             { width: 100%; object-fit: cover; display: block; border-radius: 2px; }
.img-caption          { font-size: 0.75rem; color: var(--g400); margin-top: 0.75rem; letter-spacing: 0.04em; }
.img-shadow           { box-shadow: 0 12px 40px rgba(0,0,0,0.1); }
.img-gap              { margin-top: 3px; }             /* tight stack between full-width images */

.cs-media-stack {
  margin-top: 2rem;
}
.cs-media-stack + .cs-media-stack {
  margin-top: 2.5rem;
}

/* Aspect ratio utilities — applied directly on <img class="img-full ratio-*"> */
.ratio-3-4  { aspect-ratio: 3/4; }
.ratio-4-3  { aspect-ratio: 4/3; }
.ratio-4-5  { aspect-ratio: 4/5; }
.ratio-2-3  { aspect-ratio: 2/3; }
.ratio-16-7 { aspect-ratio: 16/7; }
.ratio-16-8 { aspect-ratio: 16/8; }
.ratio-16-9 { aspect-ratio: 16/9; }

/* Photo grids */
.photo-grid-2         { display: grid; grid-template-columns: 1fr 1fr; gap: 3px; }
.photo-grid-2--spaced { gap: 1.5rem; margin-top: 1.5rem; }  /* wider gap variant */
.photo-grid-3         { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 3px; }

.property-gallery {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  grid-template-rows: 200px 200px;
  gap: 4px;
  margin-top: 2rem;
}
.gallery-item {
  overflow: hidden;
  border-radius: 3px;
}
.gallery-item--featured {
  grid-row: span 2;
}
.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.gallery-item:hover img { transform: scale(1.04); }

/* e. Process list */
.process-list { display: flex; flex-direction: column; }
.process-item {
  display: grid;
  grid-template-columns: 4rem 1fr;
  gap: 1.5rem;
  padding: 2rem 0;
  border-bottom: 1px solid var(--g200);
}
.process-item:last-child { border-bottom: none; }
.process-num {
  font-family: var(--serif);
  font-size: 3rem;
  color: var(--g200);
  line-height: 1;
  text-align: right;
}
.process-body { display: flex; flex-direction: column; gap: 0.25rem; }
.process-body h4 { font-size: 1rem; font-weight: 500; margin-bottom: 0.5rem; }
.process-body p  { font-size: 0.9rem; font-weight: 300; color: var(--g700); line-height: 1.75; }

/* f. Deliverables grid */
.deliverables-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}
.del-item  { padding: 1.25rem 1rem 1rem; border: 1px solid var(--g200); border-radius: 2px; }
.del-icon  { font-size: 1.3rem; margin-bottom: 0.5rem; }
.del-label { font-size: 0.88rem; font-weight: 500; margin-bottom: 0.2rem; }
.del-sub   { font-size: 0.75rem; color: var(--g400); }

/* g. Pullquote */
.pullquote {
  border-left: 2px solid var(--accent);
  padding: 1.5rem 2rem;
  margin: 2rem 0;
  background: var(--g100);
  border-radius: 0 2px 2px 0;
}
.pullquote p {
  font-family: var(--serif);
  font-size: 1.15rem;
  color: var(--black);
  line-height: 1.5;
  font-style: italic;
}

/* h. Next project CTA */
.cs-next    { background: var(--black); color: var(--white); padding: 5rem 3rem; text-align: center; }
.next-label { font-size: 0.68rem; letter-spacing: 0.15em; text-transform: uppercase; margin-bottom: 1rem; }
.next-title {
  font-family: var(--serif);
  font-size: clamp(2rem, 4vw, 3.5rem);
  letter-spacing: -0.02em;
  margin-bottom: 2rem;
  color: var(--white);
}
.next-btn {
  display: inline-block;
  padding: 1rem 2.5rem;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 2px;
  font-size: 0.82rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--white);
  cursor: pointer;
  background: none;
  font-family: var(--sans);
  transition: background 0.2s, color 0.2s;
}
.next-btn:hover { background: var(--white); color: var(--black); }

.cs-next-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
}
.prev-project-btn {
  display: inline-block;
  padding: 1rem 2.5rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 2px;
  font-size: 0.82rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.4);
  cursor: pointer;
  background: none;
  font-family: var(--sans);
  transition: border-color 0.2s, color 0.2s;
}
.prev-project-btn:hover { border-color: rgba(255,255,255,0.35); color: rgba(255,255,255,0.75); }


/* ── 12. PROJECT-SPECIFIC STYLES ─────────────────────────── */

/* a. Sterling Custom Homes */
.palette-row { display: flex; gap: 1rem; margin: 1.5rem 0; align-items: center; }
.swatch-block { display: flex; flex-direction: column; gap: 0.4rem; align-items: center; }
.swatch { width: 56px; height: 56px; border-radius: 4px; border: 1px solid var(--g200); }
.swatch-hex  { font-size: 0.72rem; color: var(--g400); letter-spacing: 0.04em; }
.swatch-name { font-size: 0.7rem; color: var(--g700); }

.flyer-wrap {
  position: relative;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.12), 0 4px 16px rgba(0, 0, 0, 0.08);
  border-radius: 2px;
  overflow: hidden;
  transform: rotate(-1.5deg);
  transition: transform 0.4s ease;
}
.flyer-wrap:hover { transform: rotate(0deg) scale(1.02); }

.logo-wrap {
  background: var(--navy);
  padding: 3rem 2.5rem;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.flyer-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-top: 2rem;
}

.flyer-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 2rem;
}

.sheet-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  margin-top: 2rem;
}

.cs-flyer-showcase {
  background: var(--g100);
  padding: 4rem 3rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

/* b. Kasata Sushi Den */
.identity-block { padding: 4rem 0; background: var(--black); color: var(--white); }
p.body--on-dark { color: rgba(255,255,255,0.55); max-width: 640px; }

.type-spec { border-top: 1px solid rgba(255, 255, 255, 0.1); padding-top: 2rem; margin-top: 2rem; }
.type-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.type-role { font-size: 0.75rem; letter-spacing: 0.1em; text-transform: uppercase; color: rgba(255, 255, 255, 0.35); }
.type-name { font-size: 0.9rem; color: rgba(255, 255, 255, 0.7); }
.type-hex  { font-size: 0.78rem; font-family: monospace; }

.logo-evolution { display: flex; flex-direction: column; gap: 2rem; margin-top: 1.5rem; }
.logo-row { display: flex; align-items: center; gap: 1.5rem; }
.logo-step {
  padding: 1.25rem 1.5rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 2px;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.6);
  flex: 1;
  text-align: center;
}
.logo-step.final { background: var(--red); border-color: var(--red); color: var(--white); }
.logo-arrow { color: rgba(255, 255, 255, 0.25); }

.tagline-display {
  font-family: var(--serif);
  font-size: clamp(1.5rem, 3vw, 2.5rem);
  color: var(--white);
  font-style: italic;
  line-height: 1.2;
  margin-top: 1.5rem;
}

.menu-tiers { display: flex; flex-direction: column; gap: 1.25rem; margin-top: 2rem; }
.menu-tier {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  padding: 1.25rem;
  background: var(--white);
  border-radius: 2px;
  border-left: 3px solid transparent;
}
.tier-premium { border-left-color: var(--red); }
.tier-mid     { border-left-color: var(--g400); }
.tier-entry   { border-left-color: var(--g200); }
.tier-name  { font-size: 0.88rem; font-weight: 500; margin-bottom: 0.25rem; }
.tier-desc  { font-size: 0.8rem; color: var(--g400); line-height: 1.5; }
.tier-price { font-size: 0.85rem; font-weight: 500; white-space: nowrap; margin-top: 0.15rem; }

/* c. Garage Cave */
.specs-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-top: 1.5rem;
}
.specs-grid--inline { max-width: 720px; }
.spec-item { padding: 1.25rem; background: var(--g100); border-radius: 2px; text-align: center; }
.cs-section--tinted .spec-item { background: #ffffff; }
.spec-val   { font-family: var(--serif); font-size: 1.5rem; color: var(--black); margin-bottom: 0.25rem; }
.spec-label { font-size: 0.75rem; color: var(--g400); text-transform: uppercase; letter-spacing: 0.08em; }

/* d. Novae Beautique */
.novae-palette { display: flex; gap: 1rem; margin: 1.5rem 0; }
.novae-swatch  { display: flex; flex-direction: column; gap: 0.4rem; align-items: center; }
.novae-swatch-block { width: 64px; height: 40px; border-radius: 2px; }


/* ── BACK TO TOP ─────────────────────────────────────────── */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: rgba(var(--accent-rgb), 0.5);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s, transform 0.2s;
  z-index: 150;
  backdrop-filter: blur(6px);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
}
.back-to-top.visible {
  opacity: 1;
  pointer-events: auto;
}
.back-to-top:hover { transform: translateY(-3px); }
.back-to-top .btt-arrow {
  stroke: var(--black);
  transition: stroke 0.2s;
}
.back-to-top.over-dark .btt-arrow { stroke: var(--white); }


/* ── PAGE TABLE OF CONTENTS ──────────────────────────────── */
.page-toc {
  position: fixed;
  left: 22px;
  top: 94px; /* 72px nav + 22px gap */
  z-index: 100;
  display: flex;
  flex-direction: column;
  width: fit-content;
  background: rgba(255, 255, 255, 0.5);
  box-shadow: 2px 0 16px rgba(0, 0, 0, 0.07);
  border-radius: 10px;
  padding: 0.85rem 1.25rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}
.page-toc.toc-visible {
  opacity: 1;
  pointer-events: all;
}
.toc-item {
  font-family: var(--sans);
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(0, 0, 0, 0.35);
  text-decoration: none;
  padding: 0.3rem 0;
  cursor: pointer;
  transition: color 0.2s;
  white-space: nowrap;
}
.toc-item:hover {
  color: rgba(0, 0, 0, 0.65);
}
.toc-item.toc-active {
  color: var(--toc-color, var(--accent));
}
@media (max-width: 1024px) {
  .page-toc { display: none; }
}


/* ── 13. ANIMATION SYSTEM ────────────────────────────────── */

/* Layer A — page fade on navigation */
@keyframes pageFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* Layer B — staggered entrance (data-reveal elements) */
[data-reveal] {
  opacity: 0;
  transform: translateY(20px);
  will-change: opacity, transform;
}
[data-reveal].is-visible {
  animation: revealUp 0.8s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
[data-reveal="1"] { animation-delay: 0ms;   }
[data-reveal="2"] { animation-delay: 150ms; }
[data-reveal="3"] { animation-delay: 300ms; }
[data-reveal="4"] { animation-delay: 450ms; }
[data-reveal="5"] { animation-delay: 600ms; }

/* Layer C — scroll reveal (IntersectionObserver)
 *
 * Uses keyframe animation, not transition. Transitions require a prior
 * committed paint at opacity:0 to animate FROM — if the page just became
 * display:block, that paint may not exist yet and the transition silently
 * skips. Animations always start from their own `from` keyframe regardless
 * of painted state, so they are immune to this race condition.
 */
.scroll-reveal {
  opacity: 0;
  transform: translateY(28px);
}
.scroll-reveal.is-visible {
  animation: scrollReveal 0.75s cubic-bezier(0.22, 1, 0.36, 1) both;
}

/* Stagger for sibling scroll-reveals in grids */
.scroll-reveal.is-visible:nth-child(2) { animation-delay: 80ms; }
.scroll-reveal.is-visible:nth-child(3) { animation-delay: 160ms; }
.scroll-reveal.is-visible:nth-child(4) { animation-delay: 80ms; }
.scroll-reveal.is-visible:nth-child(5) { animation-delay: 160ms; }
.scroll-reveal.is-visible:nth-child(6) { animation-delay: 240ms; }

@keyframes scrollReveal {
  from { opacity: 0; transform: translateY(28px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes revealUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}


/* ── 14. RESPONSIVE ──────────────────────────────────────── */
@media (max-width: 900px) {
  nav { padding: 1rem 1.5rem; }

  .hero { padding: 0 1.5rem 4rem; }
  .hero-scroll { display: none; }

  .about, .work { padding: 5rem 1.5rem; }

  .project { grid-template-columns: 1fr; min-height: auto; }
  .project:nth-child(even) .project-visual { order: 0; }
  .project-visual { height: 300px; }

  .form-row { grid-template-columns: 1fr; }

  .contact-hero-content { padding: 0 1.5rem 3rem; }
  .contact-body { padding: 4rem 1.5rem; }
  .contact-cols { grid-template-columns: 1fr; gap: 3rem; }

  .ap-grid { grid-template-columns: repeat(2, 1fr); }

  .cs-hero-content { padding: 0 1.5rem 3rem; }
  .cs-overview { padding: 1.3rem 0; }
  .cs-overview .container { flex-wrap: wrap; justify-content: center; }
  .ov-item { flex: 0 0 50%; border-right: none; border-bottom: 1px solid rgba(255,255,255,0.08); padding: 1rem 1.5rem; }
  .ov-item:nth-last-child(-n+2) { border-bottom: none; }

  .container { padding: 0 1.5rem; }
  .two-col { grid-template-columns: 1fr; gap: 2.5rem; }
  .body-3col { grid-template-columns: 1fr; gap: 1.5rem; }
  .photo-grid-2, .photo-grid-3 { grid-template-columns: 1fr; }
  .property-gallery { grid-template-columns: 1fr 1fr; grid-template-rows: 180px 180px 180px; }
  .gallery-item--featured { grid-row: span 1; }

  .identity-block { padding: 3rem 0; }
  .process-item { grid-template-columns: 3rem 1fr; gap: 1rem; }
  .process-num { font-size: 2rem; }
  .specs-grid { grid-template-columns: 1fr 1fr; }
  .zagg-hero { min-height: 620px; }
  .zagg-hero-logo { top: 42%; font-size: clamp(4rem, 18vw, 7rem); }
  .zagg-material-grid,
  .zagg-showcase,
  .zagg-showcase--reverse,
  .zagg-install-grid {
    grid-template-columns: 1fr;
  }
  .zagg-showcase--reverse img { order: 0; }
  .zagg-showcase-copy { padding: 1.5rem; }
  .zagg-install-grid img:first-child { grid-row: auto; }

  footer { flex-direction: column; gap: 0.75rem; text-align: center; }
}

@media (max-width: 600px) {
  .ap-grid { grid-template-columns: 1fr; }
  .zagg-hero-logo { font-size: clamp(3.4rem, 21vw, 5rem); }
  .zagg-message-asset,
  .zagg-phone-asset { padding: 1.25rem; }
  .zagg-install-grid img { min-height: 210px; }
}

@media (prefers-reduced-motion: reduce) {
  .zagg-hero-logo,
  .zagg-hero-field span {
    animation: none;
  }
}


/* ── PASSWORD GATE ────────────────────────────────────────── */
/* Remove this entire block when going public                 */

#site-gate {
  position: fixed;
  inset: 0;
  background: url('../images/hero-bg.jpg') center / cover no-repeat;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem;
}

#site-gate::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(13, 13, 13, 0.72);
}

.gate-logo {
  position: absolute;
  top: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1;
}

.gate-logo .st0 {
  fill: var(--white);
}

.gate-unlocked #site-gate { display: none; }

.gate-inner {
  position: relative;
  z-index: 1;
  max-width: 520px;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.gate-inner .hero-name {
  margin-bottom: 1.5rem;
  text-align: center;
}

.gate-sub {
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 300;
  color: rgba(250, 250, 248, 0.45);
  line-height: 1.6;
  margin-bottom: 2.5rem;
}

#gate-input {
  width: 100%;
  max-width: 260px;
  background: transparent;
  border: 1px solid rgba(250,250,248,0.15);
  border-radius: 6px;
  color: var(--white);
  font-family: var(--sans);
  font-size: 0.95rem;
  padding: 0.8rem 1.25rem;
  text-align: center;
  outline: none;
  letter-spacing: 0.08em;
  transition: border-color 0.2s;
}

#gate-input::placeholder {
  color: rgba(250,250,248,0.2);
  letter-spacing: 0.05em;
}

#gate-input:focus {
  border-color: rgba(250,250,248,0.4);
}

.gate-error {
  font-family: var(--sans);
  font-size: 0.75rem;
  color: #c0392b;
  margin-top: 0.85rem;
  min-height: 1em;
  letter-spacing: 0.02em;
}

@keyframes gateShake {
  0%, 100% { transform: translateX(0); }
  20%       { transform: translateX(-8px); }
  40%       { transform: translateX(8px); }
  60%       { transform: translateX(-5px); }
  80%       { transform: translateX(5px); }
}

#gate-input.gate-shake {
  animation: gateShake 0.4s cubic-bezier(0.36, 0.07, 0.19, 0.97);
}
