/* ==========================================================================
   Design tokens
   Everything visual lives here. To reskin the site, edit only this block.

   - Colors:      base surfaces (bg / raised / sunken), text hierarchy, and
                  the brand gradient (violet -> blue) used for buttons,
                  borders, underlines and the recommended package card —
                  the same accent as justinbauer.design, on a dark ground.
   - Gradients:   the accent gradient, plus an optional hero overlay.
   - Borders:     a hairline weight for dividers, and a 4px "emphasis"
                  weight for buttons/cards, matching justinbauer.design.
   - Spacing:     one shared scale (xs -> 2xl) used for all margin/padding.
   - Typography:  Manrope, the same responsive body size and fluid
                  h1/h2/h3 scale (weights + letter-spacing per level)
                  as justinbauer.design.
   - Motion:      shared ease/duration for hover, underline and menu.
   - Layout:      shared max-width and section rhythm (128px/72px at
                  820px), matching justinbauer.design.
   ========================================================================== */
:root {
  /* Colors
     Accent gradient (--color-accent / --color-accent-2) is carried over
     verbatim from justinbauer.design's brand purple-to-blue gradient —
     it's the same button colour, just on a dark ground. --color-accent-text
     is a lightened tint of that same hue, used only where the colour sits
     on text/links directly on the dark background and needs more contrast
     than the raw brand colour gives. */
  --color-bg: #1a1a1a;
  --color-bg-raised: #242424;       /* cards, work tiles */
  --color-bg-sunken: #121212;       /* footer, contrast zones */
  --color-text-primary: #e8e6e0;
  --color-text-secondary: #a3a099;
  --color-text-muted: #8f8d85;      /* WCAG AA (4.5:1) against every bg it's used on, incl. worst-case on a bg-dots pixel */
  --color-accent: #670bf4;          /* brand gradient start — buttons, borders, underlines */
  --color-accent-2: #5666f0;        /* brand gradient end — darkened from #5c6dff so white button text stays AA-compliant */
  --color-accent-bg: #150f28;       /* accent tint background — outline button hover, recommended package */
  --color-accent-text: #b9a1fb;     /* lightened accent for links/nav text on dark bg */
  --color-accent-text-2: #9db3ff;   /* lightened accent-2, pairs with accent-text for text-on-dark gradients (e.g. the nav logo) */
  --color-border: #232323;
  --color-border-strong: #3a3a3a;
  --color-dot: rgba(61, 61, 61, 0.35); /* bg-dots pattern — #3D3D3D at 35% opacity */

  /* Gradients
     --gradient-accent is for surfaces that carry white text or sit on
     dark backgrounds as borders/fills (buttons, the featured package
     border) — its stops are dark enough to keep white text AA-compliant.
     --gradient-accent-text is for the reverse case: colour used AS text
     directly on the dark page background (the nav logo's ".photo") —
     its stops are lightened versions of the same hues so the text itself
     stays AA-compliant against --color-bg. */
  --gradient-accent: linear-gradient(-45deg, var(--color-accent) 0%, var(--color-accent-2) 100%);
  --gradient-accent-text: linear-gradient(-45deg, var(--color-accent-text) 0%, var(--color-accent-text-2) 100%);
  --gradient-hero-overlay: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.7) 100%);

  /* Dotted background — same pattern recipe as justinbauer.design's
     bg-dots, recoloured for this palette. Applied via .bg-dots. */
  --dot-size: 2px;
  --dot-gap: 12px;
  --pattern-dots: radial-gradient(var(--color-dot) var(--dot-size), transparent var(--dot-size)) 0 0 / var(--dot-gap) var(--dot-gap), var(--color-bg);

  /* Borders & radius — 2px radius and a 4px emphasis border/outline weight,
     matching justinbauer.design's button and card treatment. */
  --border-width-hairline: 0.5px;
  --border-width-thin: 1px;
  --border-width-emphasis: 4px;
  --radius-sm: 2px;              /* used everywhere — buttons, cards, image slots, nav */
  --radius-round: 50%;           /* the one deliberate exception: the circular about portrait */

  /* Spacing scale */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 32px;
  --space-xl: 48px;
  --space-2xl: 80px;

  /* Typography — same type system as justinbauer.design: Manrope, the
     same responsive body size, the same fluid h1/h2/h3 scale, weights
     and letter-spacing per level. font-size-sm/lg/xl are this site's
     own additions for captions, the hero subhead and the statement
     quote — justinbauer.design has no equivalent tokens for those. */
  --font-sans: 'Manrope', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-size-desktop: 17px;
  --font-size-mobile: 15px;
  --font-size-sm: 12px;
  --font-size-lg: 20px;
  --font-size-xl: 32px;
  --font-size-h1: clamp(2.369rem, 6vw, 5.61rem);
  --font-size-h2: 1.75rem;
  --font-size-h3: 1.125rem;
  --line-height-body: 1.65;
  --line-height-heading: 1.25;
  --font-weight-regular: 400;
  --font-weight-semibold: 600;
  --font-weight-extrabold: 800;
  --letter-spacing-h1: 0.05em;
  --letter-spacing-h2: 0.03em;
  --letter-spacing-h3: 0.02em;
  --letter-spacing-body: 0.01em;
  --letter-spacing-label: 0.08em;

  /* Motion — shared ease/duration for button hover, nav underline and the
     mobile menu open/close, matching justinbauer.design's timing. */
  --ease-ui: cubic-bezier(0.2, 0, 0, 1);
  --duration-ui: 400ms;

  /* Focus */
  --focus-color: var(--color-accent-text);
  --focus-width: 4px;
  --focus-offset: 4px;

  /* Layout — container width/gutter, section rhythm, button and card
     padding all carried over from justinbauer.design's own tokens. */
  --max-width-content: 1040px;
  --max-width-narrow: 720px;
  --container-gutter: 20px;
  --nav-height: 72px;
  --section-pad-y-desktop: 128px;
  --section-pad-y-mobile: 72px;
  --btn-padding-y: 1.15rem;
  --btn-padding-x: 1.35rem;
  --card-padding: 1.5rem;
  --nav-link-gap: 1.5rem;
  --nav-inner-gap: 1rem;
}

/* ==========================================================================
   Reset
   ========================================================================== */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-height);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  * {
    transition: none !important;
    animation: none !important;
  }
}

body,
h1,
h2,
h3,
p,
figure,
figcaption {
  margin: 0;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

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

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}

:focus-visible {
  outline: var(--focus-width) solid var(--focus-color);
  outline-offset: var(--focus-offset);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ==========================================================================
   Base
   ========================================================================== */
body {
  background: var(--color-bg);
  color: var(--color-text-primary);
  font-family: var(--font-sans);
  font-size: var(--font-size-desktop);
  line-height: var(--line-height-body);
  letter-spacing: var(--letter-spacing-body);
  -webkit-font-smoothing: antialiased;
}

@media (max-width: 480px) {
  body {
    font-size: var(--font-size-mobile);
  }
}

h1,
h2,
h3 {
  font-weight: var(--font-weight-extrabold);
  line-height: var(--line-height-heading);
}

h1 {
  font-size: var(--font-size-h1);
  letter-spacing: var(--letter-spacing-h1);
}

h2 {
  font-size: var(--font-size-h2);
  letter-spacing: var(--letter-spacing-h2);
}

h3 {
  font-size: var(--font-size-h3);
  letter-spacing: var(--letter-spacing-h3);
}

a:hover {
  color: var(--color-accent-text);
}

.max-width {
  max-width: var(--max-width-content);
  margin: 0 auto;
  padding: 0 var(--container-gutter);
}

.max-width-narrow {
  max-width: var(--max-width-narrow);
  margin: 0 auto;
  padding: 0 var(--container-gutter);
}

.label {
  font-size: var(--font-size-sm);
  letter-spacing: var(--letter-spacing-label);
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.label-right {
  text-align: right;
}

section {
  padding: var(--section-pad-y-desktop) 0;
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--btn-padding-y) var(--btn-padding-x);
  border-radius: var(--radius-sm);
  border: 0;
  font-weight: var(--font-weight-extrabold);
  letter-spacing: var(--letter-spacing-h1);
  transition: filter var(--duration-ui) var(--ease-ui), background-color var(--duration-ui) var(--ease-ui), outline-color var(--duration-ui) var(--ease-ui);
}

.btn-accent {
  background: var(--gradient-accent);
  color: #fff;
}

.btn-accent:hover {
  /* Darken rather than brighten — brightening pushed the accent-2 end
     of the gradient light enough to fail AA contrast for the white
     button text; darkening only ever improves that contrast. */
  filter: saturate(1.15) brightness(0.85);
}

.btn-outline {
  background: var(--color-bg);
  color: var(--color-accent-text);
  outline: var(--border-width-emphasis) solid var(--color-accent);
  outline-offset: calc(var(--border-width-emphasis) * -1);
}

.btn-outline:hover {
  background-color: var(--color-accent-bg);
  outline-color: var(--color-accent-text);
  filter: saturate(1.1);
}

/* ==========================================================================
   Nav
   ========================================================================== */
.nav {
  position: sticky;
  top: 0;
  z-index: 1000;
  height: var(--nav-height);
  background: var(--color-bg);
  border-bottom: var(--border-width-hairline) solid var(--color-border);
}

.nav-inner {
  height: 100%;
  max-width: var(--max-width-content);
  margin: 0 auto;
  padding: 0 var(--container-gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--nav-inner-gap);
}

.nav-logo {
  font-weight: var(--font-weight-extrabold);
  letter-spacing: -0.01em;
  color: var(--color-text-primary);
  transition: color var(--duration-ui) var(--ease-ui);
}

.nav-logo:hover {
  color: var(--color-accent-text);
}

.nav-logo-accent {
  background: var(--gradient-accent-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  transition: filter var(--duration-ui) var(--ease-ui);
}

.nav-logo:hover .nav-logo-accent {
  filter: saturate(1.15) brightness(1.3);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--nav-link-gap);
}

.nav-links a {
  position: relative;
  font-weight: var(--font-weight-semibold);
  color: var(--color-accent-text);
  letter-spacing: var(--letter-spacing-h1);
  transition: color var(--duration-ui) var(--ease-ui);
}

.nav-links a::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -0.4em;
  height: 2px;
  background: var(--gradient-accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--duration-ui) var(--ease-ui);
}

/* Underline only reacts to hover — no persistent "active section" state. */
.nav-links a:hover::after {
  transform: scaleX(0.8);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  width: 44px;
  height: 44px;
  padding: 0;
}

.nav-toggle span {
  display: block;
  height: 2px;
  margin: 0 auto;
  width: 20px;
  background: var(--color-text-primary);
}

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
  padding-top: 0;
  padding-bottom: var(--space-xl);
}

/* Full-bleed, sits directly under the sticky nav (which reserves its own
   height in normal flow, so no extra offset is needed here). Height is
   the smaller of 80% of the viewport and a true 16:9 crop at full width
   (56.25vw = 100vw * 9/16) — on almost every real viewport that's the
   16:9 figure, so the photo renders uncropped instead of object-fit:cover
   zooming into a sliver of it (which is what a flat 80vh does on portrait
   phone screens, where it also forced a big upscale and looked blurry).
   Only on unusually wide/short windows does the 80vh cap take over,
   cropping top/bottom like any full-bleed hero banner. */
.hero-media {
  width: 100%;
  height: min(80vh, 56.25vw);
}

.hero-media .img-slot {
  height: 100%;
  border-radius: 0;
}

.hero-content {
  padding-top: var(--space-xl);
}

.hero-headline {
  margin-top: var(--space-md);
}

.hero-subhead {
  margin-top: var(--space-md);
  font-size: var(--font-size-lg);
  color: var(--color-text-secondary);
}

.hero-body {
  margin-top: var(--space-sm);
  color: var(--color-text-secondary);
  max-width: 46ch;
}

.hero-actions {
  display: flex;
  gap: var(--space-md);
  margin-top: var(--space-lg);
}

/* ==========================================================================
   Dotted background
   Applied to .statement, .packages and .contact.
   ========================================================================== */
.bg-dots {
  background: var(--pattern-dots);
}

/* ==========================================================================
   Statement
   ========================================================================== */
.statement {
  text-align: center;
}

.statement-text {
  font-size: var(--font-size-xl);
  line-height: var(--line-height-heading);
  color: var(--color-text-primary);
}

/* ==========================================================================
   Section heading
   ========================================================================== */
.section-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-md);
  margin-bottom: var(--space-xl);
  padding-bottom: var(--space-md);
  border-bottom: var(--border-width-hairline) solid var(--color-border);
}

/* ==========================================================================
   Work
   ========================================================================== */
.work-sub {
  margin-bottom: var(--space-2xl);
}

.work-sub:last-child {
  margin-bottom: 0;
}

.sub-label {
  color: var(--color-text-secondary);
  margin-bottom: var(--space-lg);
  max-width: 46ch;
}

.grid {
  display: grid;
  gap: var(--space-md);
}

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

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

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

.grid-2 + .grid-4,
.grid-4 + .work-sequence {
  margin-top: var(--space-lg);
}

.work-sequence {
  margin-top: var(--space-lg);
}

.work-item figcaption {
  margin-top: var(--space-sm);
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
}

.work-sequence figcaption {
  margin-top: var(--space-sm);
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
}

/* ==========================================================================
   Image slots + missing-file placeholders
   ========================================================================== */
.img-slot {
  position: relative;
  width: 100%;
  background: var(--color-bg-raised);
  overflow: hidden;
  border-radius: var(--radius-sm);
}

.aspect-4-5 {
  aspect-ratio: 4 / 5;
}

.aspect-16-9 {
  aspect-ratio: 16 / 9;
}

.img-slot picture {
  display: block;
  width: 100%;
  height: 100%;
}

.img-slot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.img-placeholder {
  display: none;
  position: absolute;
  inset: 0;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  padding: var(--space-md);
  text-align: center;
  border: 1px dashed var(--color-border-strong);
  border-radius: var(--radius-sm);
}

.img-slot.img-missing picture {
  display: none;
}

.img-slot.img-missing .img-placeholder {
  display: flex;
}

.img-placeholder-name {
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
  word-break: break-word;
}

.img-placeholder-ratio {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
}

/* ==========================================================================
   Packages
   ========================================================================== */
.card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-sm);
  padding: var(--card-padding);
  background: var(--color-bg-raised);
  border: var(--border-width-emphasis) solid var(--color-border-strong);
  border-radius: var(--radius-sm);
}

.card-featured {
  background: var(--color-accent-bg);
  border: var(--border-width-emphasis) solid var(--color-accent);
}

.card-eyebrow {
  font-size: var(--font-size-sm);
  letter-spacing: var(--letter-spacing-label);
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.card-featured .card-eyebrow {
  color: var(--color-accent-text);
}

.card-desc {
  color: var(--color-text-secondary);
}

.card-price {
  font-weight: var(--font-weight-extrabold);
  margin-top: auto;
  padding-top: var(--space-md);
}

.card .btn {
  width: 100%;
  margin-top: var(--space-sm);
}

/* ==========================================================================
   About
   ========================================================================== */
.about-inner {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: var(--space-2xl);
  align-items: center;
}

.about-image {
  border-radius: var(--radius-round);
}

.about-image.img-slot.aspect-4-5 {
  aspect-ratio: 1 / 1;
}

.about-text p {
  color: var(--color-text-secondary);
  max-width: 52ch;
}

.about-text p + p {
  margin-top: var(--space-md);
}

.about-text a {
  color: var(--color-accent-text);
  border-bottom: var(--border-width-hairline) solid var(--color-accent-text);
}

/* ==========================================================================
   Contact
   ========================================================================== */
.contact-item .label {
  margin-bottom: var(--space-xs);
}

.contact-item a {
  font-size: var(--font-size-lg);
}

.contact-item a:hover {
  color: var(--color-accent-text);
}

.contact-static {
  font-size: var(--font-size-lg);
}

/* ==========================================================================
   Footer
   ========================================================================== */
.footer {
  background: var(--color-bg-sunken);
  border-top: var(--border-width-hairline) solid var(--color-border);
  padding: var(--space-xl) 0;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.footer-links {
  display: flex;
  gap: var(--space-lg);
}

.footer-links a {
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
}

.footer-links a:hover {
  color: var(--color-text-primary);
}

.footer-contact {
  display: flex;
  flex-wrap: wrap;
  row-gap: var(--space-xs);
  gap: var(--space-sm);
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
}

.footer-contact a {
  color: var(--color-text-muted);
}

.footer-contact a:hover {
  color: var(--color-accent-text);
}

.footer-copy {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
  margin-top: var(--space-md);
}

/* ==========================================================================
   404 page
   ========================================================================== */
.error-main {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: calc(100vh - var(--nav-height));
  padding: var(--space-2xl) var(--container-gutter);
}

.error-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-lg);
  max-width: var(--max-width-narrow);
}

.error-message {
  color: var(--color-text-primary);
  font-size: var(--font-size-lg);
  line-height: var(--line-height-body);
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1024px) {
  .grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }

  .about-inner {
    grid-template-columns: 240px 1fr;
    gap: var(--space-xl);
  }
}

@media (max-width: 900px) {
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Section vertical rhythm switches at 820px, same breakpoint
   justinbauer.design uses for its own --section-pad-y-mobile. */
@media (max-width: 820px) {
  section {
    padding: var(--section-pad-y-mobile) 0;
  }
}

@media (max-width: 640px) {
  :root {
    --space-2xl: 56px;
  }

  .nav-toggle {
    display: flex;
  }

  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0;
    background: var(--color-bg);
    border-bottom: var(--border-width-hairline) solid var(--color-border);
    opacity: 0;
    transform: translateY(-8px);
    pointer-events: none;
    transition: opacity var(--duration-ui) var(--ease-ui), transform var(--duration-ui) var(--ease-ui);
  }

  .nav-links.open {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }

  .nav-links a {
    padding: var(--space-md) var(--container-gutter);
    border-top: var(--border-width-hairline) solid var(--color-border);
  }

  .nav-links a:first-child {
    border-top: 0;
  }

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

  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }

  .packages-grid {
    grid-template-columns: 1fr;
  }

  .about-inner {
    grid-template-columns: 1fr;
    text-align: left;
  }

  .about-image {
    max-width: 220px;
  }

  .contact-grid {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .statement-text {
    font-size: var(--font-size-lg);
  }
}
