/* ==========================================================================
   Devin Carter — Conversion Copywriter
   Style: Dark & Premium — glassmorphism, soft teal glow, fine grain.
   Design tokens sourced from design-system/MASTER.md.
   ========================================================================== */

:root {
  --bg: #0E1416;
  --surface: #141B1D;
  --surface-glass: rgba(255,255,255,0.04);
  --text: #F2F5F4;
  --text-muted: #9BAAA8;
  --accent: #4FD1C5;
  --accent-2: #2DD4BF;
  --accent-contrast: #08201D;
  --border: rgba(255,255,255,0.08);
  --border-hover: rgba(79,209,197,0.35);

  --font-display: 'Space Grotesk', system-ui, sans-serif;
  --font-body: 'Outfit', system-ui, sans-serif;

  --radius: 16px;
  --maxw: 1080px;
  --space: clamp(3.5rem, 9vw, 7rem);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* --- Reset --- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  font-weight: 300;
  color: var(--text);
  background: var(--bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  position: relative;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }

/* --- Fine grain texture overlay --- */
.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,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* --- Accessibility --- */
.skip-link {
  position: absolute; left: -999px; top: 0;
  background: var(--accent); color: var(--accent-contrast); padding: .6rem 1rem; z-index: 100;
  border-radius: 0 0 8px 0; font-weight: 600;
}
.skip-link:focus { left: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* --- Layout --- */
.container { position: relative; z-index: 2; width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: 1.25rem; }
.section { padding-block: var(--space); }

/* --- Type --- */
h1, h2, h3 { font-family: var(--font-display); line-height: 1.15; font-weight: 600; letter-spacing: -0.01em; }
.eyebrow {
  text-transform: uppercase; letter-spacing: .16em; font-size: .78rem;
  color: var(--accent); margin-bottom: .85rem; font-weight: 600;
  font-family: var(--font-display);
}
.section__title { font-size: clamp(1.7rem, 4vw, 2.5rem); margin-bottom: 1.75rem; color: var(--text); }
.prose { color: var(--text-muted); max-width: 60ch; font-size: 1.08rem; font-weight: 300; }

/* --- Nav --- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(14, 20, 22, 0.72);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.nav { display: flex; align-items: center; justify-content: space-between; padding-block: 1.1rem; }
.nav__brand { font-family: var(--font-display); font-weight: 700; text-decoration: none; font-size: 1.15rem; letter-spacing: -0.01em; }
.nav__menu { list-style: none; display: flex; gap: 1.75rem; align-items: center; padding: 0; }
.nav__menu a { text-decoration: none; color: var(--text-muted); transition: color 200ms var(--ease); }
.nav__menu a:hover { color: var(--accent); }
.nav__cta {
  color: var(--accent-contrast) !important; font-weight: 600;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  padding: .55rem 1.1rem; border-radius: 8px;
}
.nav__cta:hover { color: var(--accent-contrast) !important; }
.nav__toggle { display: none; flex-direction: column; gap: 5px; background: none; border: 0; cursor: pointer; padding: .4rem; }
.nav__toggle span { width: 22px; height: 2px; background: var(--text); display: block; border-radius: 2px; }

/* --- Buttons --- */
.btn {
  display: inline-block; text-decoration: none; padding: .95rem 1.7rem; border-radius: 10px;
  font-weight: 600; font-family: var(--font-body); cursor: pointer;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), border-color .2s var(--ease);
}
.btn--primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: var(--accent-contrast);
  box-shadow: 0 0 30px rgba(79,209,197,0.22);
}
.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 0 44px rgba(79,209,197,0.38); }
.btn--ghost { border: 1px solid var(--border); color: var(--text); }
.btn--ghost:hover { transform: translateY(-2px); border-color: var(--border-hover); }

/* --- Hero --- */
.hero { display: grid; gap: 3rem; padding-block: clamp(3.5rem, 11vw, 8rem); align-items: center; }
.hero__headline { font-size: clamp(2.3rem, 6vw, 3.8rem); margin-bottom: 1.25rem; }
.hero__sub { color: var(--text-muted); font-size: 1.15rem; max-width: 48ch; margin-bottom: 2.25rem; font-weight: 300; }
.hero__actions { display: flex; gap: 1rem; flex-wrap: wrap; }

/* --- Image slots (premium placeholders) --- */
.media-slot {
  position: relative; border-radius: var(--radius); overflow: hidden;
  background: linear-gradient(145deg, var(--surface), color-mix(in srgb, var(--accent) 16%, var(--surface)));
  display: grid; place-items: center; color: var(--text-muted); border: 1px solid var(--border);
  box-shadow: 0 0 50px rgba(79,209,197,0.12), 0 20px 40px rgba(0,0,0,0.4);
}
.media-slot::after {
  content: attr(data-initials); font-family: var(--font-display); font-size: 2.4rem; font-weight: 700;
  color: var(--accent); opacity: .65; letter-spacing: 0.02em;
}
.media-slot--portrait { aspect-ratio: 4 / 5; }
.media-slot--project { aspect-ratio: 16 / 10; }

/* --- Cards grid (glassmorphism) --- */
.grid { list-style: none; padding: 0; display: grid; gap: 1.25rem; }
.grid--cards { grid-template-columns: 1fr; }
.card {
  background: var(--surface-glass);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border); border-radius: var(--radius); padding: 1.75rem;
  box-shadow: 0 8px 24px rgba(0,0,0,0.35);
  transition: transform .25s var(--ease), border-color .25s var(--ease), box-shadow .25s var(--ease);
}
.card:hover { border-color: var(--border-hover); transform: translateY(-4px); box-shadow: 0 16px 36px rgba(0,0,0,0.45); }
.card__title { font-size: 1.2rem; margin-bottom: .6rem; color: var(--text); }
.card__body { color: var(--text-muted); font-weight: 300; }

/* --- Work --- */
.work { display: grid; gap: 2.5rem; }
.project { display: grid; gap: 1.25rem; }
.project__title { margin-bottom: .5rem; }
.project__what { color: var(--text-muted); margin-bottom: .75rem; font-weight: 300; }
.project__result {
  color: var(--accent); font-family: var(--font-display); font-size: 1.05rem;
}

/* --- Process --- */
.steps { list-style: none; padding: 0; display: grid; gap: 1.75rem; counter-reset: step; }
.step { display: grid; gap: .35rem; padding-left: 3.75rem; position: relative; }
.step__n {
  position: absolute; left: 0; top: -.1rem; font-family: var(--font-display); font-size: 1.6rem;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text; background-clip: text; color: transparent; font-weight: 700;
}
.step p { color: var(--text-muted); font-weight: 300; }

/* --- Testimonials --- */
.quote {
  background: var(--surface-glass);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border); border-radius: var(--radius); padding: 1.75rem;
}
.quote p { margin-bottom: 1.1rem; font-size: 1.05rem; }
.quote cite { color: var(--accent); font-style: normal; font-weight: 600; font-family: var(--font-display); font-size: .9rem; }

/* --- FAQ --- */
.faq { display: grid; gap: .6rem; max-width: 70ch; }
.faq details {
  border: 1px solid var(--border); border-radius: var(--radius); padding: 1.15rem 1.4rem;
  background: var(--surface-glass); transition: border-color .2s var(--ease);
}
.faq details[open] { border-color: var(--border-hover); }
.faq summary { cursor: pointer; font-weight: 600; font-family: var(--font-display); }
.faq details p { color: var(--text-muted); margin-top: .85rem; font-weight: 300; }

/* --- Contact --- */
.contact .social { list-style: none; padding: 0; display: flex; gap: 1.25rem; margin-top: 1.75rem; flex-wrap: wrap; }
.contact .social a {
  display: inline-flex; align-items: center; gap: .5rem; color: var(--text-muted); text-decoration: none;
  border: 1px solid var(--border); border-radius: 8px; padding: .6rem 1rem; cursor: pointer;
  transition: color .2s var(--ease), border-color .2s var(--ease);
}
.contact .social a:hover { color: var(--accent); border-color: var(--border-hover); }

/* --- Footer --- */
.site-footer { padding-block: 2.75rem; color: var(--text-muted); border-top: 1px solid var(--border); margin-top: var(--space); font-size: .9rem; }

/* --- Reveal on scroll --- */
[data-reveal] { opacity: 1; }
.js [data-reveal] { opacity: 0; transform: translateY(20px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.js [data-reveal].is-visible { opacity: 1; transform: none; }

/* ========================= Responsive ========================= */
@media (min-width: 720px) {
  .grid--cards { grid-template-columns: repeat(2, 1fr); }
  .hero { grid-template-columns: 1.2fr .8fr; }
  .project { grid-template-columns: 1fr 1fr; align-items: center; }
}
@media (min-width: 1024px) {
  .grid--cards { grid-template-columns: repeat(3, 1fr); }
  .steps { grid-template-columns: repeat(3, 1fr); }
}

/* Mobile nav */
@media (max-width: 719px) {
  .nav__toggle { display: flex; }
  .nav__menu {
    position: absolute; inset: 64px 0 auto 0; flex-direction: column; gap: 0;
    background: rgba(14,20,22,0.97); backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border); padding: 1rem 1.25rem;
    display: none;
  }
  .nav__menu.is-open { display: flex; }
  .nav__menu li { padding: .7rem 0; }
  .nav__cta { display: inline-block; }
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js [data-reveal] { opacity: 1; transform: none; transition: none; }
  .btn:hover, .card:hover { transform: none; }
  .grain { display: none; }
}
