/* Daylight Media — Sunset Warm brand system (see ../docs/brand-guidelines.md) */

:root {
  --color-primary: #F97316; /* decorative/icon use only — fails WCAG AA as text or under white text, verified 2.80:1 */
  --color-primary-dark: #C2570E; /* verified 4.50:1 with white text — use for CTA button backgrounds, orange text-on-white */
  --color-primary-hover: #A8460B; /* verified 5.92:1 — hover/active state, one step darker than primary-dark */
  --color-secondary: #DC2626;
  --color-accent: #FACC15;
  --color-bg: #FFFFFF;
  --color-surface: #FFF7ED;
  --color-text: #1C1917;
  --color-text-muted: #78716C;
  --color-border: #E7E5E4;

  --font-heading: 'Poppins', system-ui, -apple-system, sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --nav-height: 76px;
  --transition-fast: 180ms ease;
}

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

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}

/* Scroll reveal — hidden/offset until .is-visible is added by script.js.
   transform+opacity only (no layout properties), so this never causes
   layout shift. Skipped entirely under prefers-reduced-motion. */
[data-reveal] {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 400ms ease, transform 400ms ease;
}
[data-reveal].is-visible { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) {
  [data-reveal] { opacity: 1; transform: none; transition: none; }
}

/* Custom cursor — decorative only, fine-pointer devices only (see
   script.js gating), never replaces the native cursor. */
.cursor-dot {
  position: fixed; top: 0; left: 0; width: 14px; height: 14px;
  margin: -7px 0 0 -7px;
  border-radius: 50%; background: var(--color-primary-dark);
  opacity: 0; pointer-events: none; z-index: 2000;
  transition: opacity 150ms ease, width 200ms ease, height 200ms ease, background 200ms ease, margin 200ms ease;
  will-change: transform;
}
.cursor-dot--active {
  width: 36px; height: 36px; margin: -18px 0 0 -18px;
  background: transparent; border: 2px solid var(--color-primary-dark);
}
@media (hover: none), (pointer: coarse) {
  .cursor-dot { display: none; }
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--color-text);
  background: var(--color-bg);
  font-size: 16px;
  line-height: 1.6;
}

h1, h2, h3, h4 { font-family: var(--font-heading); line-height: 1.25; margin: 0 0 0.5em; }
h1 { font-size: clamp(2rem, 4vw + 1rem, 3.25rem); font-weight: 700; }
h2 { font-size: clamp(1.5rem, 2.5vw + 1rem, 2.25rem); font-weight: 600; }
h3 { font-size: 1.15rem; font-weight: 600; }
p { margin: 0 0 1em; color: var(--color-text-muted); max-width: 65ch; }

a { color: var(--color-primary-dark); }
a:focus-visible, button:focus-visible, [tabindex]:focus-visible {
  outline: 3px solid var(--color-primary-dark);
  outline-offset: 2px;
}

.container { max-width: 1180px; margin: 0 auto; padding: 0 24px; }
.center { text-align: center; margin-left: auto; margin-right: auto; }
.text-accent { color: var(--color-primary-dark); }

.eyebrow {
  color: var(--color-primary-dark);
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 0.75em;
}

/* Skip link */
.skip-link {
  position: absolute; left: -999px; top: 0;
  background: var(--color-text); color: #fff;
  padding: 12px 20px; z-index: 1000; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-body); font-weight: 600; font-size: 0.95rem;
  padding: 14px 24px; border-radius: var(--radius-sm);
  border: 2px solid transparent; cursor: pointer;
  min-height: 44px;
  transition: transform var(--transition-fast), background var(--transition-fast), border-color var(--transition-fast);
  text-decoration: none;
}
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--color-primary-dark); color: #fff; }
.btn-primary:hover { background: var(--color-primary-hover); }
.btn-secondary { background: transparent; border-color: var(--color-primary-dark); color: var(--color-primary-dark); }
.btn-secondary:hover { background: var(--color-surface); }
.btn-on-accent { background: #fff; color: var(--color-primary-dark); }
.btn-on-accent:hover { background: var(--color-surface); }
.btn-sm { padding: 10px 18px; font-size: 0.875rem; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--color-border);
  height: var(--nav-height);
  display: flex; align-items: center;
}
.header-inner { display: flex; align-items: center; justify-content: space-between; width: 100%; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand-icon { width: 32px; height: 32px; flex-shrink: 0; }
.brand-name { font-family: var(--font-heading); font-weight: 700; font-size: 1.15rem; color: var(--color-text); }
.brand-accent { color: var(--color-primary-dark); font-weight: 500; }

.main-nav { display: flex; gap: 32px; }
.main-nav a {
  color: var(--color-text); text-decoration: none; font-weight: 500; font-size: 0.95rem;
  padding-bottom: 4px; border-bottom: 2px solid transparent;
  transition: border-color var(--transition-fast), color var(--transition-fast);
}
.main-nav a:hover, .main-nav a.active { border-color: var(--color-primary-dark); color: var(--color-primary-dark); }
.main-nav-cta { display: none; } /* shown only inside the mobile nav panel — see max-width: 860px below */

.header-actions { display: flex; align-items: center; gap: 16px; }

.nav-toggle {
  display: none; flex-direction: column; justify-content: center; gap: 5px;
  width: 44px; height: 44px; background: none; border: none; cursor: pointer;
}
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--color-text); transition: transform var(--transition-fast), opacity var(--transition-fast); }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Hero */
.hero { padding: 72px 0; background: linear-gradient(180deg, var(--color-surface), #fff); }
.hero-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 48px; align-items: center; }
.hero-sub { font-size: 1.05rem; max-width: 52ch; }
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 8px; }

/* Hero monitor illustration — a generic sample-site mockup, deliberately
   not branded as any real client (the Work section below covers real,
   named projects). Pure CSS shapes with layered elevation shadows for
   realistic depth: thin-bezel display, angled neck, elliptical base. */
.monitor { display: flex; flex-direction: column; align-items: center; max-width: 460px; margin: 0 auto; }

/* Display: dark aluminum bezel, thin top/sides, thicker chin, glare, LED. */
.monitor-screen {
  position: relative; width: 100%;
  background: linear-gradient(155deg, #4b4a48 0%, #2b2926 45%, #201e1c 100%);
  border-radius: 16px;
  padding: 10px 10px 26px;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.12),
    inset 0 -1px 0 rgba(0,0,0,0.5),
    0 2px 4px rgba(0,0,0,0.2),
    0 26px 50px -20px rgba(28,25,23,0.45),
    0 50px 80px -40px rgba(28,25,23,0.35);
}
/* Power LED on the chin. */
.monitor-screen::after {
  content: ""; position: absolute; left: 50%; bottom: 9px; transform: translateX(-50%);
  width: 5px; height: 5px; border-radius: 50%;
  background: #7ee27e; box-shadow: 0 0 5px rgba(126,226,126,0.9);
}
.monitor-inner {
  position: relative; background: #fff; border-radius: 6px; overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.35);
}
/* Diagonal glass glare across the screen. */
.monitor-glare {
  position: absolute; inset: 10px 10px 26px; border-radius: 6px;
  background: linear-gradient(125deg, rgba(255,255,255,0.14) 0%, rgba(255,255,255,0.05) 22%, rgba(255,255,255,0) 40%);
  pointer-events: none; z-index: 3;
}
/* Angled neck connecting display to base. */
.monitor-neck {
  width: 46px; height: 30px;
  background: linear-gradient(180deg, #3a3836 0%, #24221f 100%);
  clip-path: polygon(38% 0, 62% 0, 78% 100%, 22% 100%);
  margin-top: -2px;
}
/* Elliptical base with a soft contact shadow beneath. */
.monitor-base {
  position: relative; width: 150px; height: 14px; border-radius: 50%;
  background: linear-gradient(180deg, #3a3836 0%, #201e1c 60%, #14120f 100%);
  margin-top: -3px;
}
.monitor-base::after {
  content: ""; position: absolute; left: 50%; top: 60%; transform: translateX(-50%);
  width: 220px; height: 26px; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(28,25,23,0.28), rgba(28,25,23,0));
  z-index: -1;
}

/* ── Mockup site inside the screen ── */
.demo-site { font-size: 12px; }
.demo-nav {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 18px; border-bottom: 1px solid var(--color-border);
  background: rgba(255,255,255,0.85);
}
.demo-logo { display: flex; align-items: center; gap: 6px; font-family: var(--font-heading); font-weight: 700; font-size: 0.82rem; color: var(--color-text); }
.demo-logo-mark { width: 14px; height: 14px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, var(--color-accent), var(--color-primary-dark)); flex-shrink: 0; }
.demo-links { display: flex; align-items: center; gap: 12px; font-size: 0.66rem; color: var(--color-text-muted); }
.demo-nav-cta { background: var(--color-primary-dark); color: #fff; padding: 5px 11px; border-radius: 6px; font-weight: 600; }

/* Two-column hero, like a real above-the-fold. */
.demo-hero { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 16px; align-items: center; padding: 24px 20px 20px; background: linear-gradient(180deg, var(--color-surface), #fff); }
.demo-eyebrow { display: inline-block; font-size: 0.58rem; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; color: var(--color-primary-dark); margin-bottom: 7px; }
.demo-title { font-family: var(--font-heading); font-weight: 700; font-size: 1.15rem; line-height: 1.15; color: var(--color-text); margin-bottom: 8px; }
.demo-title span { color: var(--color-primary-dark); }
.demo-sub { font-size: 0.7rem; line-height: 1.4; color: var(--color-text-muted); margin-bottom: 12px; }
.demo-hero-actions { display: flex; gap: 8px; }
.demo-cta { display: inline-block; white-space: nowrap; background: var(--color-primary-dark); color: #fff; font-size: 0.68rem; font-weight: 600; padding: 7px 14px; border-radius: 7px; }
.demo-cta-ghost { display: inline-block; white-space: nowrap; border: 1.5px solid var(--color-border); color: var(--color-text); font-size: 0.68rem; font-weight: 600; padding: 7px 14px; border-radius: 7px; }

/* Floating visual panel — a card with placeholder lines + a rating chip. */
.demo-hero-panel {
  position: relative; background: #fff; border-radius: 10px; padding: 14px;
  border: 1px solid var(--color-border);
  box-shadow: 0 10px 24px -12px rgba(28,25,23,0.25);
}
.demo-panel-bar { height: 44px; border-radius: 7px; background: linear-gradient(135deg, #201e1c, #44403c); margin-bottom: 10px; }
.demo-panel-line { height: 7px; border-radius: 4px; background: var(--color-border); margin-bottom: 7px; }
.demo-panel-line--lg { width: 90%; background: #d8d4d1; }
.demo-panel-line--sm { width: 55%; }
.demo-panel-chip {
  position: absolute; right: -8px; bottom: -8px;
  background: var(--color-accent); color: var(--color-text);
  font-size: 0.6rem; font-weight: 700; padding: 4px 8px; border-radius: 6px;
  box-shadow: 0 6px 14px -6px rgba(28,25,23,0.4);
}

/* Feature cards strip beneath the hero. */
.demo-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; padding: 4px 20px 22px; background: #fff; }
.demo-card { border: 1px solid var(--color-border); border-radius: 8px; padding: 11px; }
.demo-card-icon { display: block; width: 20px; height: 20px; border-radius: 6px; background: var(--color-surface); border: 1px solid var(--color-border); margin-bottom: 8px; }
.demo-card-bar { display: block; height: 6px; width: 70%; border-radius: 4px; background: var(--color-border); }

/* Services */
.services, .work, .process, .about { padding: 88px 0; }
.services { background: #fff; }
.cards-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 48px; }
.card {
  border: 1px solid var(--color-border); border-radius: var(--radius-md); padding: 32px;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}
.card:hover { transform: translateY(-4px); box-shadow: 0 16px 32px -20px rgba(28,25,23,0.2); }
.card-icon { width: 44px; height: 44px; border-radius: 10px; background: var(--color-surface); color: var(--color-primary-dark); display: flex; align-items: center; justify-content: center; margin-bottom: 16px; }
.card-icon svg { width: 22px; height: 22px; }

/* Work / Portfolio */
.work { background: var(--color-surface); }
.portfolio-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; margin-top: 48px; }
.portfolio-card { background: #fff; border-radius: var(--radius-md); overflow: hidden; border: 1px solid var(--color-border); }
.portfolio-visual { padding: 32px; min-height: 160px; display: flex; flex-direction: column; justify-content: center; }
.portfolio-visual-junk { background: #0B1210; color: #fff; }
.portfolio-visual-peak { background: linear-gradient(135deg, #1C1917, #44403C); color: #fff; }
.portfolio-visual-badge { display: inline-block; background: rgba(255,255,255,0.12); padding: 4px 10px; border-radius: 6px; font-size: 0.75rem; font-weight: 600; margin-bottom: 12px; width: fit-content; }
.portfolio-visual-headline { font-family: var(--font-heading); font-size: 1.4rem; font-weight: 700; margin: 0; color: #fff; }
.portfolio-info { padding: 24px; }
.portfolio-info p { font-size: 0.9rem; margin-bottom: 0.5em; }
.portfolio-desc { color: var(--color-text-muted); }

/* Process */
.process-steps { list-style: none; padding: 0; margin: 48px 0 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.process-steps li { text-align: center; }
.step-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 50%; background: var(--color-primary-dark); color: #fff;
  font-family: var(--font-heading); font-weight: 700; margin-bottom: 16px;
}

/* About */
.about { background: #fff; }
.about-grid p { max-width: 60ch; }

/* CTA banner */
.cta-banner { background: var(--color-primary-dark); color: #fff; padding: 56px 0; }
.cta-banner-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.cta-banner h2, .cta-banner p { color: #fff; margin: 0; }
.cta-banner p { margin-top: 6px; } /* opacity reduction removed — it was cutting into contrast margin on an already-borderline color pair */

/* Footer */
.site-footer { background: var(--color-text); color: #D6D3D1; padding: 56px 0 24px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px; }
.footer-brand .brand-name { color: #fff; }
.footer-brand p { margin-top: 12px; color: #D6D3D1; }
.footer-col h2 { color: #fff; margin-bottom: 16px; font-size: 1rem; font-weight: 600; }
.footer-col ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.footer-col a { color: #D6D3D1; text-decoration: none; }
.footer-col a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid #44403C; margin-top: 40px; padding-top: 24px; font-size: 0.85rem; }
.footer-bottom p { color: #D6D3D1; }
.footer-bottom a { color: #D6D3D1; text-decoration: underline; }
.footer-bottom a:hover { color: #fff; }

/* Modal */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(28,25,23,0.55);
  display: flex; align-items: center; justify-content: center; padding: 24px; z-index: 1000;
}
.modal-overlay[hidden] { display: none; }
.modal {
  background: #fff; border-radius: var(--radius-lg); padding: 32px; max-width: 480px; width: 100%;
  position: relative; box-shadow: 0 30px 60px -20px rgba(0,0,0,0.35);
}
.modal-close {
  position: absolute; top: 16px; right: 16px; width: 36px; height: 36px;
  border-radius: 50%; border: none; background: var(--color-surface); font-size: 1.3rem; cursor: pointer;
  display: flex; align-items: center; justify-content: center; color: var(--color-text);
}
.booking-placeholder { background: var(--color-surface); border-radius: var(--radius-sm); padding: 16px; font-size: 0.9rem; }
.booking-placeholder code { background: #fff; padding: 2px 6px; border-radius: 4px; font-size: 0.85em; }

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

@media (max-width: 860px) {
  .main-nav {
    position: fixed; top: var(--nav-height); left: 0; right: 0;
    height: calc(100vh - var(--nav-height)); height: calc(100dvh - var(--nav-height));
    background: #fff; flex-direction: column; gap: 0; padding: 8px 24px;
    transform: translateY(-8px); opacity: 0; pointer-events: none;
    transition: transform var(--transition-fast), opacity var(--transition-fast);
    overflow-y: auto;
  }
  .main-nav.open { transform: translateY(0); opacity: 1; pointer-events: auto; }
  .main-nav a { padding: 16px 0; border-bottom: 1px solid var(--color-border); width: 100%; }
  .main-nav-cta { display: inline-flex; width: 100%; justify-content: center; margin-top: 20px; }
  .nav-toggle { display: flex; }
  .header-actions .btn-sm { display: none; }

  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { order: -1; }
  .cards-grid { grid-template-columns: 1fr; }
  .portfolio-grid { grid-template-columns: 1fr; }
  .process-steps { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .cta-banner-inner { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 480px) {
  .container { padding: 0 18px; }
  .hero { padding: 48px 0; }
  .services, .work, .process, .about { padding: 56px 0; }
}

/* Legal pages (privacy.html, terms.html) — kept here rather than an inline
   <style> block so the strict style-src CSP (no unsafe-inline) doesn't
   silently break their layout once deployed. */
.legal { max-width: 720px; margin: 0 auto; padding: 64px 24px 96px; }
.legal h1 { margin-bottom: 0.3em; }
.legal .updated { color: var(--color-text-muted); margin-bottom: 2em; }
.legal h2 { margin-top: 2em; font-size: 1.2rem; }
.legal p, .legal li { max-width: none; }
.legal .notice { background: var(--color-surface); border-radius: var(--radius-sm); padding: 16px 20px; margin-bottom: 2em; }
