/*
Theme Name:  Deucis
Description: Deucis Digital Marketing Agency — custom child theme
Author:      Deucis
Version:     1.0.0
Template:    twentytwentyfour
*/

/* ============================================================
   TOKENS
============================================================ */
:root {
  --lav-50:  #faf6ff;
  --lav-100: #f1e9ff;
  --lav-300: #d6b3f0;
  --lav-600: #8d72b8;
  --lav-700: #6e5499;
  --lav-800: #4b357f;
  --lav-900: #2d1f55;
  --ink:     #1a1230;
  --muted:   #6e5499;
  --line:    rgba(75,53,127,0.15);
  --brand:   #4b357f;
  --deep:    #2d1f55;
  --surface: rgba(255,255,255,0.55);
  --surface-strong: rgba(255,255,255,0.88);
  --serif: 'Fraunces', Georgia, serif;
  --sans:  'DM Sans', system-ui, sans-serif;
  --mono:  ui-monospace, 'SF Mono', Menlo, monospace;
  --radius: 24px;
  --gutter: clamp(20px, 5vw, 60px);
  --section: clamp(72px, 12vh, 140px);
}

/* ============================================================
   RESET + BASE
============================================================ */
*, *::before, *::after { box-sizing: border-box; min-width: 0; }
html, body { margin: 0; overflow-x: hidden; }
body {
  font-family: var(--sans);
  color: var(--ink);
  background: var(--lav-50);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

/* Hide TwentyTwentyFour's own chrome */
.wp-block-template-part,
#wp--skip-link--target,
.wp-site-blocks > header,
.wp-site-blocks > footer { display: none !important; }

/* ============================================================
   BACKGROUND FIELD + GRAIN
============================================================ */
.field {
  position: fixed; inset: 0; z-index: -2; pointer-events: none;
  background:
    radial-gradient(900px 600px at 80% -5%,  rgba(214,179,240,0.55), transparent 70%),
    radial-gradient(700px 500px at -5% 40%,  rgba(141,114,184,0.28), transparent 70%),
    var(--lav-50);
}
.grain {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  opacity: 0.05; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

/* ============================================================
   CONTAINER
============================================================ */
.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ============================================================
   TYPE SCALES
============================================================ */
.eyebrow {
  font-family: var(--sans);
  font-size: 11px; font-weight: 600;
  letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--muted);
  display: inline-flex; align-items: center; gap: 10px;
}
.eyebrow .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: currentColor; opacity: 0.6; flex-shrink: 0;
}
.display {
  font-family: var(--serif); font-weight: 300;
  letter-spacing: -0.03em; line-height: 0.93;
  margin: 0; color: var(--ink);
  font-size: clamp(44px, 8.5vw, 130px);
}
.display em { font-style: italic; font-weight: 400; }
.title {
  font-family: var(--serif); font-weight: 300;
  letter-spacing: -0.025em; line-height: 1;
  margin: 0; color: var(--ink);
  font-size: clamp(34px, 5.5vw, 72px);
}
.title em { font-style: italic; font-weight: 400; }
.body-text { font-size: 17px; line-height: 1.55; color: var(--muted); }
.small { font-size: 14px; line-height: 1.6; color: var(--muted); }
.mono-label {
  font-family: var(--mono);
  font-size: 11px; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--muted);
}

/* ============================================================
   BUTTONS
============================================================ */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 15px 26px;
  font-family: var(--sans); font-size: 14px; font-weight: 500;
  border: none; cursor: pointer; border-radius: 999px;
  text-decoration: none; white-space: nowrap;
  transition: transform 280ms cubic-bezier(.2,.8,.2,1), box-shadow 280ms;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary {
  background: var(--brand); color: #fff;
  box-shadow: 0 1px 0 rgba(255,255,255,0.3) inset, 0 12px 32px -12px rgba(75,53,127,0.65);
}
.btn-primary:hover {
  box-shadow: 0 1px 0 rgba(255,255,255,0.3) inset, 0 18px 40px -12px rgba(75,53,127,0.75);
}
.btn-glass {
  background: var(--surface-strong); color: var(--ink);
  border: 1px solid var(--line);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 1px 0 rgba(255,255,255,0.7) inset;
}
.btn-white { background: #fff; color: var(--deep); }
.btn-outline {
  background: transparent; color: #fff;
  border: 1px solid rgba(214,179,240,0.45);
}
.btn .arrow { width: 16px; height: 16px; transition: transform 260ms; }
.btn:hover .arrow { transform: translateX(3px); }
.arrow-svg { display: block; }

/* ============================================================
   GLASS CARD
============================================================ */
.glass {
  background: var(--surface);
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 1px 0 rgba(255,255,255,0.55) inset, 0 24px 60px -32px rgba(45,31,85,0.35);
}

/* ============================================================
   NAV
============================================================ */
.nav {
  position: fixed; top: 14px; left: 0; right: 0; z-index: 100;
  display: flex; flex-direction: column; align-items: center;
  pointer-events: none;
}
.nav-pill {
  pointer-events: auto;
  display: flex; align-items: center; gap: 24px;
  padding: 9px 10px 9px 20px;
  border-radius: 999px;
  background: var(--surface-strong);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  border: 1px solid var(--line);
  box-shadow: 0 1px 0 rgba(255,255,255,0.7) inset, 0 16px 40px -20px rgba(45,31,85,0.35);
  max-width: calc(100vw - 20px);
}
.nav-brand {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--serif); font-weight: 300;
  font-size: 20px; letter-spacing: -0.04em; color: var(--ink);
  flex-shrink: 0;
}
.nav-brand svg { width: 28px; height: 28px; }
.nav-links { display: flex; align-items: center; gap: 20px; }
.nav-links a {
  font-size: 13px; font-weight: 500; color: var(--muted);
  transition: color 180ms;
}
.nav-links a:hover { color: var(--ink); }
.nav-cta { padding: 9px 18px; font-size: 13px; }

/* Hamburger */
.nav-toggle {
  display: none;
  background: none; border: none; cursor: pointer;
  width: 38px; height: 38px;
  align-items: center; justify-content: center;
  color: var(--ink); border-radius: 999px;
  transition: background 180ms; padding: 0;
}
.nav-toggle:hover { background: rgba(75,53,127,0.07); }
.nav-toggle svg { width: 20px; height: 20px; display: block; }
.bar { transition: transform 260ms cubic-bezier(.2,.8,.2,1), opacity 200ms; transform-origin: 50% 50%; }
.nav-toggle.open .bar1 { transform: translateY(4px) rotate(45deg); }
.nav-toggle.open .bar2 { transform: translateY(-4px) rotate(-45deg); }

/* Mobile dropdown */
.nav-panel {
  pointer-events: auto;
  display: none; flex-direction: column; gap: 2px;
  margin-top: 8px; padding: 12px;
  min-width: 220px;
  background: var(--surface-strong);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: 0 20px 50px -20px rgba(45,31,85,0.45);
  animation: panelIn 220ms cubic-bezier(.2,.8,.2,1);
}
.nav-panel.open { display: flex; }
@keyframes panelIn {
  from { opacity: 0; transform: translateY(-8px) scale(0.96); }
  to   { opacity: 1; transform: none; }
}
.nav-panel a {
  font-size: 15px; font-weight: 500; color: var(--ink);
  padding: 11px 14px; border-radius: 12px;
  transition: background 160ms;
}
.nav-panel a:hover { background: rgba(75,53,127,0.07); }
.nav-panel .btn-primary { color: #fff; margin-top: 6px; justify-content: center; }

/* ============================================================
   HERO
============================================================ */
.hero {
  min-height: 100svh;
  display: flex; align-items: center; justify-content: center;
  padding: 130px var(--gutter) 72px;
  text-align: center;
  position: relative; overflow: hidden;
}
.hero-inner {
  display: flex; flex-direction: column;
  align-items: center; gap: 0;
  position: relative; z-index: 2;
  max-width: 900px;
}
.hero-mark {
  color: var(--brand);
  margin-bottom: 36px;
  filter: drop-shadow(0 20px 48px rgba(75,53,127,0.2));
}
.hero-mark svg { width: clamp(100px, 14vw, 160px); display: block; }
.hero .eyebrow { margin-bottom: 28px; }
.hero .display { max-width: 16ch; }
.hero-sub {
  font-size: clamp(16px, 1.8vw, 20px);
  color: var(--muted); line-height: 1.5;
  max-width: 44ch;
  margin: 24px auto 0;
}
.hero-ctas {
  display: flex; gap: 12px; flex-wrap: wrap;
  justify-content: center;
  margin-top: 40px;
}
.hero-note {
  font-size: 12px; color: var(--muted); letter-spacing: 0.04em;
  margin-top: 16px;
}
.hero-ring {
  position: absolute; pointer-events: none; color: var(--brand);
}
.hero-ring--tr {
  top: -8%; right: -10%; opacity: 0.5;
  will-change: transform;
}
.hero-ring--bl {
  bottom: -16%; left: -8%; opacity: 0.28;
  color: var(--lav-600);
  will-change: transform;
}
.hero-ring svg { display: block; }
.hero-ring--tr svg { width: clamp(300px, 52vw, 680px); }
.hero-ring--bl svg { width: clamp(240px, 40vw, 500px); }

/* ============================================================
   SECTION SCAFFOLD
============================================================ */
.section { padding: var(--section) 0; }
.section-dark {
  background: linear-gradient(180deg, var(--deep) 0%, var(--ink) 100%);
  color: #f6efff;
}
.section-dark .title,
.section-dark .display { color: #f6efff; }
.section-dark .body-text,
.section-dark .small,
.section-dark .eyebrow,
.section-dark .mono-label { color: #d6b3f0; }
.sec-head { margin-bottom: clamp(40px, 6vh, 64px); }
.sec-head .eyebrow { margin-bottom: 18px; }
.sec-head .title { margin-top: 0; }

/* ============================================================
   SERVICES
============================================================ */
.services-list { display: flex; flex-direction: column; }
.service-row {
  display: grid;
  grid-template-columns: 56px 1fr 1.1fr;
  gap: 32px; align-items: start;
  padding: 44px 0;
  border-top: 1px solid var(--line);
}
.service-row:last-child { border-bottom: 1px solid var(--line); }
.service-num { font-family: var(--mono); font-size: 12px; color: var(--muted); padding-top: 10px; letter-spacing: 0.1em; }
.service-name {
  font-family: var(--serif); font-style: italic; font-weight: 400;
  font-size: clamp(30px, 4vw, 52px);
  letter-spacing: -0.025em; line-height: 1; color: var(--ink);
  margin: 0;
}
.service-hook {
  font-family: var(--serif); font-style: italic; font-weight: 400;
  font-size: 18px; color: var(--brand);
  margin: 12px 0 0; line-height: 1.3;
}
.service-desc { font-size: 15px; color: var(--muted); line-height: 1.6; margin: 12px 0 0; max-width: 40ch; }
.service-bullets {
  list-style: none; padding: 0; margin: 20px 0 0;
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px 20px;
}
.service-bullets li {
  display: flex; gap: 8px; align-items: baseline;
  font-size: 13px; color: var(--ink);
}
.service-bullets li::before {
  content: '';
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--brand); flex-shrink: 0;
  transform: translateY(2px);
}

/* ============================================================
   MANIFESTO STRIP
============================================================ */
.manifesto {
  padding: clamp(56px, 9vh, 110px) 0;
  overflow: hidden; position: relative;
}
.manifesto-track {
  display: flex;
  white-space: nowrap;
  will-change: transform;
  animation: marquee 11s linear infinite;
}
.manifesto-track:hover { animation-play-state: paused; }
@keyframes marquee {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
.manifesto-text {
  font-family: var(--serif); font-style: italic; font-weight: 400;
  font-size: clamp(40px, 9vw, 140px);
  color: #f6efff; letter-spacing: -0.03em;
  flex-shrink: 0;
}
.manifesto-text .sep { color: #8d72b8; margin: 0 0.5em; }

/* ============================================================
   PORTFOLIO
============================================================ */
.port-grid { display: flex; flex-direction: column; gap: 0; }
.port-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  border-top: 1px solid var(--line);
  padding: clamp(40px, 6vw, 72px) 0;
  align-items: start;
  transition: background 220ms;
}
.port-card:last-child { border-bottom: 1px solid var(--line); }
.port-left { padding-right: clamp(24px, 4vw, 56px); }
.port-right { padding-left: clamp(24px, 4vw, 56px); border-left: 1px solid var(--line); }
.port-num {
  font-family: var(--mono); font-size: 11px;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 18px;
}
.port-client {
  font-family: var(--serif); font-style: italic; font-weight: 400;
  font-size: clamp(28px, 3.5vw, 48px);
  letter-spacing: -0.025em; line-height: 1;
  color: var(--ink); margin: 0 0 6px;
}
.port-industry {
  font-size: 13px; color: var(--muted);
  margin-bottom: 20px; font-weight: 400;
}
.port-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.port-tag {
  font-family: var(--mono); font-size: 10px;
  letter-spacing: 0.14em; text-transform: uppercase;
  padding: 5px 12px; border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--muted); background: var(--surface);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.port-tag--purple { background: rgba(75,53,127,0.08); border-color: rgba(75,53,127,0.22); color: var(--brand); }
.port-tag--green  { background: rgba(29,150,100,0.07); border-color: rgba(29,150,100,0.2); color: #1a7a52; }
.port-tag--amber  { background: rgba(180,120,0,0.07); border-color: rgba(180,120,0,0.2); color: #8a5c00; }
.port-summary { font-size: 15px; line-height: 1.65; color: var(--muted); max-width: 44ch; }

.port-metrics { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-bottom: 28px; }
.port-metric {
  background: var(--surface);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 1px 0 rgba(255,255,255,0.55) inset;
  padding: 18px 16px;
}
.port-metric-val {
  font-family: var(--serif); font-weight: 300;
  font-size: clamp(22px, 2.8vw, 34px);
  letter-spacing: -0.03em; line-height: 1;
  color: var(--ink); margin-bottom: 6px;
}
.port-metric-val em { font-style: italic; color: var(--brand); }
.port-metric-label {
  font-family: var(--mono); font-size: 10px;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--muted);
}
.port-data-rows { display: flex; flex-direction: column; gap: 0; }
.port-data-row {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 11px 0; border-bottom: 1px solid var(--line); gap: 12px;
}
.port-data-row:last-child { border-bottom: none; }
.port-data-key { font-size: 12px; color: var(--muted); font-weight: 400; flex-shrink: 0; }
.port-data-val { font-size: 13px; font-weight: 600; color: var(--ink); text-align: right; }
.port-data-val.up    { color: #1a7a52; }
.port-data-val.brand { color: var(--brand); }
.port-data-section {
  font-family: var(--mono); font-size: 10px;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--lav-600); margin: 18px 0 8px;
}

/* ============================================================
   WHY CARDS
============================================================ */
.why-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px;
  border: 1px solid rgba(214,179,240,0.22);
  border-radius: var(--radius); overflow: hidden;
  background: rgba(214,179,240,0.22);
}
.why-card {
  background: rgba(255,255,255,0.05);
  padding: clamp(28px, 4vw, 44px);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.why-card .num { font-family: var(--mono); font-size: 11px; color: #d6b3f0; letter-spacing: 0.18em; }
.why-card h3 {
  font-family: var(--serif); font-weight: 300;
  font-size: clamp(22px, 2.6vw, 32px);
  letter-spacing: -0.02em; line-height: 1.1;
  color: #fff; margin: 14px 0 14px; max-width: 18ch;
}
.why-card h3 em { font-style: italic; font-weight: 400; }
.why-card p { margin: 0; font-size: 14px; line-height: 1.6; color: #d6b3f0; max-width: 38ch; }

/* ============================================================
   TESTIMONIALS
============================================================ */
.testimonials-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.testimonial { padding: clamp(24px, 3vw, 36px); display: flex; flex-direction: column; gap: 18px; }
.testimonial blockquote {
  margin: 0; font-family: var(--serif); font-style: italic;
  font-weight: 400; font-size: clamp(18px, 2vw, 24px);
  line-height: 1.45; color: var(--ink); letter-spacing: -0.01em;
}
.testimonial-author {
  display: flex; align-items: center; gap: 14px;
  border-top: 1px solid var(--line); padding-top: 18px;
}
.testimonial-author .name { font-size: 14px; font-weight: 600; color: var(--ink); }
.testimonial-author .role { font-size: 12px; color: var(--muted); margin-top: 2px; }
.avatar {
  width: 40px; height: 40px; border-radius: 50%;
  background: linear-gradient(135deg, var(--lav-300), var(--brand));
  flex-shrink: 0; display: flex; align-items: center; justify-content: center;
  font-family: var(--serif); font-style: italic; font-weight: 400;
  font-size: 18px; color: #fff;
}

/* ============================================================
   FINAL CTA
============================================================ */
.final-cta {
  padding: clamp(88px, 14vh, 180px) 0;
  position: relative; overflow: hidden; text-align: center;
}
.cta-ring {
  position: absolute; left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  color: #f1e9ff; opacity: 0.55; pointer-events: none;
  filter: drop-shadow(0 0 60px rgba(241,233,255,0.25));
  will-change: transform;
}
.cta-ring svg { width: clamp(320px, 50vw, 560px); display: block; }
.final-cta-inner { position: relative; z-index: 2; }
.final-cta .display { color: #fff; margin: 24px auto 0; max-width: 14ch; }
.final-cta-sub {
  font-size: clamp(16px, 1.6vw, 19px); color: #d6b3f0;
  max-width: 44ch; margin: 24px auto 40px; line-height: 1.5;
}
.final-cta-ctas { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }
.final-cta-meta {
  margin-top: 44px;
  font-family: var(--mono); font-size: 11px; color: #d6b3f0;
  letter-spacing: 0.18em; text-transform: uppercase;
  display: flex; justify-content: center; gap: 24px; flex-wrap: wrap;
}

/* ============================================================
   CONTACT FORM
============================================================ */
.contact-form-wrap {
  max-width: 560px; margin: 0 auto;
}
.contact-form-wrap .field-row { margin-bottom: 16px; }
.contact-form-wrap label {
  display: block; font-size: 11px; font-weight: 600;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 6px;
}
.contact-form-wrap input,
.contact-form-wrap textarea,
.contact-form-wrap select {
  width: 100%;
  background: var(--surface-strong);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 16px;
  font-family: var(--sans); font-size: 14px; color: var(--ink);
  outline: none;
  transition: border-color 200ms;
}
.contact-form-wrap input:focus,
.contact-form-wrap textarea:focus { border-color: var(--brand); }
.contact-form-wrap textarea { resize: vertical; min-height: 100px; }
.form-msg {
  margin-top: 12px; font-size: 14px; font-weight: 500;
  display: none;
}
.form-msg.success { color: #1a7a52; display: block; }
.form-msg.error   { color: #c0392b; display: block; }

/* ============================================================
   SCROLL REVEAL
============================================================ */
.al-reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.al-reveal.revealed {
  opacity: 1;
  transform: none;
}

/* ============================================================
   FOOTER
============================================================ */
.footer {
  border-top: 1px solid var(--line);
  padding: 48px 0 32px;
  background: var(--lav-50);
}
.footer-grid {
  display: flex; justify-content: space-between;
  align-items: flex-start; gap: 40px; flex-wrap: wrap;
}
.footer-brand {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--serif); font-weight: 300;
  font-size: 20px; letter-spacing: -0.04em; color: var(--ink);
}
.footer-brand svg { width: 28px; height: 28px; }
.footer-tagline {
  font-family: var(--mono); font-size: 11px; color: var(--muted);
  letter-spacing: 0.16em; text-transform: uppercase;
  margin-top: 16px; line-height: 1.9;
}
.footer-cols { display: flex; gap: 48px; flex-wrap: wrap; }
.footer-col { display: grid; gap: 8px; }
.footer-col a { font-size: 13px; color: var(--muted); transition: color 160ms; }
.footer-col a:hover { color: var(--ink); }
.footer-social { display: flex; gap: 12px; flex-wrap: wrap; }
.footer-social a {
  width: 34px; height: 34px; border-radius: 50%;
  border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 600; color: var(--muted);
  transition: background 160ms, color 160ms;
}
.footer-social a:hover { background: var(--brand); color: #fff; border-color: transparent; }
.footer-bottom {
  margin-top: 36px; padding-top: 24px;
  border-top: 1px solid var(--line);
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px;
  font-family: var(--mono); font-size: 11px; color: var(--muted);
  letter-spacing: 0.14em; text-transform: uppercase;
}

/* ============================================================
   RESPONSIVE
============================================================ */
@media (max-width: 1024px) {
  .service-row { grid-template-columns: 48px 1fr 1fr; gap: 24px; }
  .service-bullets { grid-template-columns: 1fr; }
}

@media (max-width: 860px) {
  .nav-links, .nav-cta { display: none !important; }
  .nav-toggle { display: inline-flex !important; }
  .nav-pill { gap: 10px; padding: 7px 8px 7px 16px; }
  .service-row { grid-template-columns: 1fr; gap: 12px; padding: 32px 0; }
  .service-num { padding-top: 0; }
  .testimonials-grid { grid-template-columns: 1fr; gap: 16px; }
  .why-grid { grid-template-columns: 1fr; }
  .port-card { grid-template-columns: 1fr; gap: 32px; }
  .port-right { padding-left: 0; border-left: none; border-top: 1px solid var(--line); padding-top: 32px; }
  .port-left { padding-right: 0; }
}

@media (max-width: 600px) {
  :root { --gutter: 20px; --section: clamp(56px, 10vh, 88px); }
  .hero { padding-top: 100px; padding-bottom: 56px; min-height: auto; }
  .hero-mark svg { width: clamp(88px, 22vw, 120px); }
  .hero .display { font-size: clamp(36px, 11vw, 56px); }
  .hero-sub { font-size: 15px; }
  .hero-ctas { flex-direction: column; align-items: stretch; width: 100%; max-width: 340px; }
  .hero-ctas .btn { justify-content: center; }
  .hero-ring--tr { display: none; }
  .hero-ring--bl { display: none; }
  .footer-grid { flex-direction: column; gap: 28px; }
  .footer-cols { gap: 28px; }
  .final-cta-ctas { flex-direction: column; align-items: center; }
  .final-cta-ctas .btn { width: 100%; max-width: 320px; justify-content: center; }
  .port-metrics { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 400px) {
  .hero .display { font-size: clamp(32px, 12vw, 44px); }
  .nav-brand span { display: none; }
}

/* ============================================================
   PORTFOLIO PREVIEW + POPUP
============================================================ */
.port-preview {
  position: relative;
  margin-bottom: 24px;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--lav-100);
  aspect-ratio: 16 / 9;
  cursor: pointer;
}
.port-preview:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; }

/* Screenshot container */
.port-preview-screen {
  position: absolute; inset: 0;
  overflow: hidden;
}
.port-preview-img {
  width: 100%; height: 100%;
  object-fit: cover; object-position: top;
  display: block;
  transition: opacity 400ms ease;
}
/* Loading placeholder shown before screenshot arrives */
.port-preview-loading {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 10px;
  font-family: var(--mono); font-size: 11px;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--muted);
  background: var(--lav-100);
  transition: opacity 300ms ease;
  pointer-events: none;
}
/* Hide loading once image loads */
.port-preview.img-loaded .port-preview-loading { opacity: 0; }

/* Hover overlay */
.port-preview-overlay {
  position: absolute; inset: 0;
  background: rgba(45,31,85,0);
  display: flex; align-items: center; justify-content: center;
  transition: background 240ms ease;
}
.port-preview:hover .port-preview-overlay,
.port-preview:focus-visible .port-preview-overlay {
  background: rgba(45,31,85,0.52);
}
.port-preview-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 22px;
  background: rgba(255,255,255,0.96);
  border-radius: 999px;
  font-family: var(--sans); font-size: 13px; font-weight: 600;
  color: var(--brand);
  opacity: 0; transform: translateY(8px) scale(0.95);
  transition: opacity 200ms ease, transform 200ms ease;
  pointer-events: none;
  white-space: nowrap;
  box-shadow: 0 8px 24px -8px rgba(45,31,85,0.3);
}
.port-preview:hover .port-preview-btn,
.port-preview:focus-visible .port-preview-btn {
  opacity: 1; transform: none;
}

/* Full-screen popup */
.site-popup {
  display: none;
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(13,9,30,0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  align-items: center; justify-content: center;
  padding: 20px;
}
.site-popup.open {
  display: flex;
  animation: popupIn 200ms cubic-bezier(.2,.8,.2,1) both;
}
@keyframes popupIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
.site-popup-inner {
  width: 100%; max-width: 1200px;
  height: 88vh;
  background: #fff;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 40px 100px -20px rgba(0,0,0,0.65);
  display: flex; flex-direction: column;
  animation: popupSlide 220ms cubic-bezier(.2,.8,.2,1) both;
}
@keyframes popupSlide {
  from { transform: translateY(18px) scale(0.98); }
  to   { transform: none; }
}
.site-popup-bar {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px;
  background: var(--lav-50);
  border-bottom: 1px solid var(--line);
  flex-shrink: 0;
}
.site-popup-dots { display: flex; gap: 6px; flex-shrink: 0; }
.site-popup-dots span { width: 12px; height: 12px; border-radius: 50%; }
.site-popup-dots .d1 { background: #ff5f57; }
.site-popup-dots .d2 { background: #febc2e; }
.site-popup-dots .d3 { background: #28c840; }
.site-popup-url {
  flex: 1;
  background: var(--surface-strong);
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 5px 12px;
  font-family: var(--mono); font-size: 11px; color: var(--muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.site-popup-newtab {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 12px; font-weight: 500; color: var(--muted);
  padding: 5px 10px; border-radius: 7px;
  border: 1px solid var(--line);
  white-space: nowrap; flex-shrink: 0;
  transition: background 160ms, color 160ms;
  text-decoration: none;
}
.site-popup-newtab:hover { background: rgba(75,53,127,0.07); color: var(--brand); }
.site-popup-close {
  background: none; border: none; cursor: pointer;
  width: 30px; height: 30px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  color: var(--muted); transition: background 160ms, color 160ms;
}
.site-popup-close:hover { background: rgba(75,53,127,0.1); color: var(--ink); }

/* Popup blocked notice — shown when iframe can't embed */
.site-popup-blocked {
  display: none;
  flex: 1; align-items: center; justify-content: center;
  flex-direction: column; gap: 16px; padding: 40px;
  text-align: center;
}
.site-popup-blocked.visible { display: flex; }
.site-popup-blocked p {
  font-size: 15px; color: var(--muted); max-width: 36ch; line-height: 1.6;
}
.site-popup-frame {
  flex: 1; width: 100%; border: none; display: block;
}

/* Logo-mode thumbnail (centred, contained, dark bg) */
.port-preview-screen.port-preview-logo {
  background: #2a2a2a;
}
.port-preview-screen.port-preview-logo .port-preview-img {
  object-fit: contain;
  padding: 20%;
}
