/* crayoncity.dev - the company site: homepage, Crayon Board, contact and legal pages.
   studio.html has its own stylesheet (style.css). */

:root {
  --night: #0b0a14;
  --night-2: #12111f;
  --surface: rgba(255, 255, 255, .045);
  --line: rgba(255, 255, 255, .12);
  --text: #f4f1ea;
  --muted: #aeabbd;
  --amber: #f6b92b;
  /* The dusk sky from the city clips: gold into coral into rose. */
  --dusk: linear-gradient(100deg, #ffd27a 0%, #ff9d6c 55%, #f08fb4 100%);

  --radius: 22px;
  --font: "Geist", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-accent: "Instrument Serif", Georgia, serif;
}

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

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  background: var(--night);
  color: var(--text);
  font: 400 1.0625rem/1.65 var(--font);
  -webkit-font-smoothing: antialiased;
}

img, video { max-width: 100%; display: block; }
h1, h2, h3 { font-weight: 600; line-height: 1.06; letter-spacing: -.03em; margin: 0 0 .5em; text-wrap: balance; }
h3 { letter-spacing: -.015em; line-height: 1.25; }
p { margin: 0 0 1em; }
a { color: inherit; }
main a:not(.btn) { text-decoration-color: rgba(246, 185, 43, .7); text-decoration-thickness: 1px; text-underline-offset: 4px; }
main a:not(.btn):hover { color: var(--amber); }
[id] { scroll-margin-top: 88px; }
:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; border-radius: 6px; }

/* The one flourish: a serif italic in dusk colours on a word or two per heading. */
h1 em, h2 em {
  font-family: var(--font-accent); font-style: italic; font-weight: 400; font-size: 1.14em; letter-spacing: -.01em;
  padding-right: .08em;
  background: var(--dusk); -webkit-background-clip: text; background-clip: text; color: transparent;
}

.skip {
  position: fixed; left: 16px; top: -60px; z-index: 100;
  background: var(--text); color: var(--night); padding: 10px 16px; border-radius: 999px;
  font-weight: 600; text-decoration: none; transition: top .2s;
}
.skip:focus { top: 12px; }

.wrap { max-width: 1180px; margin: 0 auto; padding: 0 clamp(20px, 4vw, 40px); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  padding: 13px 22px; border: 1px solid transparent; border-radius: 999px; cursor: pointer;
  background: var(--text); color: var(--night);
  font: 600 .98rem/1 var(--font); text-decoration: none; white-space: nowrap;
  transition: transform .15s ease, background .15s ease;
}
.btn:hover { transform: translateY(-1px); background: #fff; }
.btn-ghost {
  background: rgba(255, 255, 255, .07); color: var(--text); border-color: rgba(255, 255, 255, .24);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.btn-ghost:hover { background: rgba(255, 255, 255, .14); }
.btn-sm { padding: 9px 16px; font-size: .9rem; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }

/* ---------- Header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto; z-index: 50;
  border-bottom: 1px solid transparent;
  transition: background .3s, border-color .3s;
}
.site-header.is-solid, .inner .site-header {
  background: rgba(11, 10, 20, .8); border-color: var(--line);
  backdrop-filter: blur(16px) saturate(140%); -webkit-backdrop-filter: blur(16px) saturate(140%);
}
.inner .site-header { position: sticky; top: 0; }
.site-header .wrap { display: flex; align-items: center; gap: 12px 28px; padding-block: 14px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.brand-mark { display: inline-flex; }
.brand-mark svg { width: 11px; height: 19px; margin-right: -2px; }
.brand-mark svg:nth-child(1) { color: #e5383b; transform: rotate(-10deg); }
.brand-mark svg:nth-child(2) { color: var(--amber); transform: translateY(-2px); }
.brand-mark svg:nth-child(3) { color: #4f7bff; transform: rotate(10deg); }
.brand-name { font: 600 1.2rem/1 var(--font); letter-spacing: -.03em; }
.site-nav { display: flex; gap: 4px; margin-left: auto; }
.site-nav a { padding: 8px 13px; border-radius: 999px; text-decoration: none; font-size: .95rem; font-weight: 500; color: rgba(244, 241, 234, .82); }
.site-nav a:hover { color: var(--text); background: rgba(255, 255, 255, .08); }
.site-nav a[aria-current] { color: var(--text); background: rgba(255, 255, 255, .12); }
.menu-btn, .nav-cta { display: none; }

/* ---------- Shared type ---------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: 12px; margin-bottom: 18px;
  font: 500 .76rem/1 var(--font); letter-spacing: .18em; text-transform: uppercase; color: var(--amber);
}
.eyebrow::before { content: ""; width: 28px; height: 1px; background: currentColor; }
.lede { font-size: 1.2rem; line-height: 1.55; color: rgba(244, 241, 234, .86); max-width: 58ch; }
.muted, .fine-print { color: var(--muted); }
.fine-print { max-width: 780px; margin: 30px 0 0; font-size: .95rem; }

.section { padding: clamp(72px, 10vw, 140px) 0; }
.section-alt { background: var(--night-2); border-block: 1px solid var(--line); }
.section-head { max-width: 780px; margin: 0 0 clamp(36px, 5vw, 60px); }
.section-head h2, .split h2, .panel h2 { font-size: clamp(2rem, 4.4vw, 3.4rem); }
.section-head.is-centered { margin-inline: auto; text-align: center; }
.section-head.is-centered .lede { margin-inline: auto; }

/* ---------- Scenes: a clip behind a whole section ---------- */
.scene { position: relative; isolation: isolate; overflow: hidden; display: flex; align-items: flex-end; min-height: min(92svh, 860px); }
.scene > .wrap { width: 100%; padding-block: clamp(110px, 16vh, 170px) clamp(64px, 10vh, 110px); }
.media { position: absolute; inset: 0; z-index: -2; background: var(--night-2); }
.media img, .media video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
/* The still sits underneath; the clip fades in over it once it is actually playing. */
.media video { opacity: 0; transition: opacity .6s ease; }
.media video.is-playing { opacity: 1; }
/* Each scene melts into the night at both ends, so sections join without a seam. */
.scene::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(to bottom, var(--night) 0%, var(--night) 3%, rgba(11, 10, 20, .35) 28%, rgba(11, 10, 20, .5) 56%, var(--night) 94%, var(--night) 100%);
}
.scene.is-centered { align-items: center; text-align: center; }
/* Text straight on the picture, with no panel, needs its own pool of shade. */
.scene.is-bare::before {
  background:
    radial-gradient(64% 50% at 50% 52%, rgba(11, 10, 20, .88), rgba(11, 10, 20, 0) 100%),
    linear-gradient(to bottom, var(--night) 0%, var(--night) 3%, rgba(11, 10, 20, .3) 28%, rgba(11, 10, 20, .45) 58%, var(--night) 94%, var(--night) 100%);
}
.scene.is-centered .actions { justify-content: center; }
.scene.is-centered .lede { margin-inline: auto; }

.scene.is-bare .lede { color: var(--text); text-shadow: 0 1px 18px rgba(11, 10, 20, .9); }

.panel {
  max-width: 600px; padding: clamp(24px, 3.4vw, 40px);
  background: rgba(11, 10, 20, .6); border: 1px solid var(--line); border-radius: var(--radius);
  backdrop-filter: blur(18px) saturate(140%); -webkit-backdrop-filter: blur(18px) saturate(140%);
  box-shadow: 0 30px 80px -30px rgba(0, 0, 0, .7);
}
.panel > :last-child { margin-bottom: 0; }
.is-centered .panel { margin-inline: auto; }

/* ---------- Home: hero ---------- */
.hero { min-height: 100svh; flex-direction: column; align-items: stretch; justify-content: flex-end; }
.hero::before {
  background:
    linear-gradient(to bottom, rgba(11, 10, 20, .7) 0%, rgba(11, 10, 20, .1) 26%, rgba(11, 10, 20, .45) 62%, var(--night) 100%),
    linear-gradient(to right, rgba(11, 10, 20, .6), rgba(11, 10, 20, 0) 70%);
}
.hero > .wrap { padding-block: clamp(120px, 20vh, 200px) clamp(28px, 5vh, 48px); }
.hero h1 { font-size: clamp(2.7rem, 6.6vw, 5.4rem); line-height: 1; letter-spacing: -.04em; max-width: 14ch; text-shadow: 0 2px 30px rgba(11, 10, 20, .5); }
.hero .lede { margin-top: 24px; text-shadow: 0 1px 16px rgba(11, 10, 20, .6); }

.facts { display: grid; grid-template-columns: repeat(4, 1fr); margin: clamp(36px, 7vh, 72px) 0 0; border-top: 1px solid var(--line); }
.facts div { padding: 20px 24px 28px 0; }
.facts div + div { padding-left: 24px; border-left: 1px solid var(--line); }
.facts dt { font: 500 .72rem/1.4 var(--font); letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.facts dd { margin: 6px 0 0; font-weight: 500; }

.motion-btn {
  position: absolute; right: clamp(20px, 4vw, 40px); top: 84px; display: none;
  padding: 7px 13px; border: 1px solid var(--line); border-radius: 999px; cursor: pointer;
  background: rgba(11, 10, 20, .5); color: var(--muted); font: 500 .78rem/1 var(--font);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.motion-btn:hover { color: var(--text); }
.js .motion-btn { display: inline-flex; }

/* ---------- Split: text beside a framed clip ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 88px); align-items: center; }
.split p { color: var(--muted); }
.split .lede { color: rgba(244, 241, 234, .86); }
.split.is-flipped .frame { order: -1; }
.frame {
  position: relative; aspect-ratio: 16 / 10; overflow: hidden; margin: 0;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--night-2);
  box-shadow: 0 40px 90px -30px rgba(0, 0, 0, .8), 0 0 120px -40px rgba(255, 157, 108, .45);
}
.frame .media { z-index: 0; }
.frame::after { content: ""; position: absolute; inset: 0; pointer-events: none; box-shadow: inset 0 0 80px rgba(11, 10, 20, .45); }

/* A wide, letterboxed clip with the section title set on it. Full-width scenes are never
   placed back to back; where two would meet, one of them is framed like this instead. */
.frame-wide { aspect-ratio: 21 / 9; margin-bottom: 20px; }
.frame-wide::after { box-shadow: none; background: linear-gradient(to top, rgba(11, 10, 20, .9) 0%, rgba(11, 10, 20, .35) 42%, rgba(11, 10, 20, 0) 70%); }
.frame-title { position: absolute; z-index: 1; inset: auto 0 0; padding: clamp(20px, 3.4vw, 44px); }
.frame-title .eyebrow { margin-bottom: 12px; }
.frame-title h2 { font-size: clamp(2rem, 4.4vw, 3.4rem); margin: 0; }

.ticks { list-style: none; padding: 0; margin: 20px 0 0; display: grid; gap: 10px; }
.ticks li { position: relative; padding-left: 28px; color: rgba(244, 241, 234, .9); }
.ticks li::before { content: ""; position: absolute; left: 2px; top: .5em; width: 12px; height: 7px; border-left: 2px solid var(--amber); border-bottom: 2px solid var(--amber); transform: rotate(-45deg); }

.contact-list { list-style: none; padding: 0; margin: 22px 0 0; display: grid; gap: 0; border-top: 1px solid var(--line); }
.contact-list li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 24px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.contact-list span { color: var(--muted); }

/* ---------- Cards ---------- */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.card { padding: 26px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.card h3 { font-size: 1.15rem; }
.card p { margin: 0; color: var(--muted); font-size: .98rem; }
.card p + p { margin-top: .8em; }
.card .price { font: 600 1.7rem/1.15 var(--font); letter-spacing: -.03em; color: var(--text); margin-bottom: 8px; }
.card-label { display: block; margin-bottom: 14px; font: 500 .72rem/1 var(--font); letter-spacing: .16em; text-transform: uppercase; color: var(--amber); }
.scene .card { background: rgba(11, 10, 20, .6); backdrop-filter: blur(18px) saturate(140%); -webkit-backdrop-filter: blur(18px) saturate(140%); }
.scene .section-head { margin-bottom: clamp(28px, 4vw, 44px); }

/* A screenshot in a small browser window. */
.shot { margin: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 16px; background: #1a1929; box-shadow: 0 40px 90px -30px rgba(0, 0, 0, .8), 0 0 140px -50px rgba(240, 143, 180, .5); }
.shot-bar { display: flex; align-items: center; gap: 6px; padding: 10px 14px; font-size: .78rem; color: var(--muted); }
.shot-bar i { width: 9px; height: 9px; border-radius: 50%; background: rgba(255, 255, 255, .18); }
.shot-bar span { margin-left: 10px; }
.shot img { width: 100%; height: auto; }
.shot figcaption { padding: 12px 16px; font-size: .9rem; color: var(--muted); }
.video-shot { max-width: 1040px; margin-inline: auto; }
.video-frame { position: relative; aspect-ratio: 16 / 9; background: #000; }
.video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.duo { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }

/* ---------- Business details ---------- */
.about-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(32px, 6vw, 80px); align-items: start; }
.about-grid h2 { font-size: clamp(1.8rem, 3.6vw, 2.6rem); }
.about-grid p { color: var(--muted); }
.company-facts { margin: 0; padding: 6px 26px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.company-facts div { display: grid; grid-template-columns: 150px 1fr; gap: 4px 20px; padding: 15px 0; border-bottom: 1px solid var(--line); }
.company-facts div:last-child { border-bottom: 0; }
.company-facts dt { font: 500 .72rem/1.9 var(--font); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.company-facts dd { margin: 0; }
.rule { height: 1px; margin: clamp(48px, 7vw, 88px) 0; border: 0; background: var(--line); }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); background: var(--night); color: var(--muted); padding: 56px 0 32px; font-size: .95rem; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: var(--text); }
.footer-grid { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: 32px; padding-bottom: 36px; }
.footer-about .brand { color: var(--text); margin-bottom: 14px; }
.footer-about p { margin: 0; max-width: 36ch; }
.footer-col h2 { font: 500 .72rem/1.4 var(--font); letter-spacing: .16em; text-transform: uppercase; color: var(--text); margin: 0 0 14px; }
.footer-col ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 9px; }
.footer-legal { padding-top: 22px; border-top: 1px solid var(--line); font-size: .86rem; }
.footer-legal p { margin: 0 0 4px; }

/* ---------- Inner pages ---------- */
.crumbs { border-bottom: 1px solid var(--line); font-size: .88rem; color: var(--muted); }
.crumbs .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 24px; padding-block: 11px; }
.crumbs ol { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0; padding: 0; }
.crumbs li + li::before { content: "/"; margin-right: 8px; opacity: .5; }
.crumbs a { text-decoration: none; }
.crumbs a:hover, .crumbs [aria-current] { color: var(--text); }
.crumbs nav + nav { display: flex; gap: 20px; }

/* A low sun behind the page title, instead of a picture. */
.page-hero { position: relative; isolation: isolate; padding: clamp(56px, 8vw, 104px) 0 clamp(36px, 5vw, 60px); }
.page-hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(60% 90% at 85% 0%, rgba(255, 157, 108, .16), transparent 70%),
    radial-gradient(50% 80% at 10% 0%, rgba(240, 143, 180, .1), transparent 70%);
}
.page-hero h1 { font-size: clamp(2.4rem, 5.6vw, 4.2rem); letter-spacing: -.04em; max-width: 16ch; }
.page-hero .fine-print { margin-top: 20px; }
.page-hero-split { display: grid; grid-template-columns: .85fr 1.15fr; gap: clamp(28px, 4vw, 64px); align-items: center; }
.doc-meta { color: var(--muted); font-size: .95rem; margin: 0; }

.steps { counter-reset: step; list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; }
.steps li { counter-increment: step; padding-top: 20px; border-top: 1px solid var(--line); }
.steps li::before { content: "0" counter(step); display: block; margin-bottom: 14px; font: 400 2rem/1 var(--font-accent); font-style: italic; color: var(--amber); }
.steps h3 { font-size: 1.1rem; }
.steps p { margin: 0; color: var(--muted); font-size: .98rem; }

.faq { max-width: 780px; display: grid; gap: 10px; }
.is-centered + .faq { margin-inline: auto; }
.faq details { padding: 16px 22px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.faq summary { cursor: pointer; font-weight: 600; }
.faq details p { margin: 12px 0 0; color: var(--muted); }

.doc { max-width: 760px; margin: 0 auto; padding-bottom: clamp(72px, 10vw, 120px); color: rgba(244, 241, 234, .84); }
.doc h2 { font-size: 1.45rem; letter-spacing: -.02em; margin-top: 2.2em; color: var(--text); }
.doc h3 { font-size: 1.1rem; margin-top: 1.6em; color: var(--text); }
.doc strong { color: var(--text); }
.doc ul, .doc ol { padding-left: 1.3em; margin: 0 0 1em; }
.doc li { margin-bottom: .45em; }
.callout { padding: 20px 24px; margin: 0 0 1.6em; border: 1px solid rgba(246, 185, 43, .4); border-radius: 16px; background: rgba(246, 185, 43, .07); }
.callout p:last-child { margin-bottom: 0; }
.doc h2 + .callout { margin-top: 1em; }
.legal-hero .wrap { max-width: 840px; }

/* ---------- Scroll reveal (only once the script is running) ---------- */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .8s ease, transform .8s ease; }
.js .reveal.is-in { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .split, .about-grid, .page-hero-split, .duo { grid-template-columns: 1fr; }
  .split.is-flipped .frame { order: 0; }
  .facts, .grid-4, .steps { grid-template-columns: repeat(2, 1fr); }
  .facts div:nth-child(3) { padding-left: 0; border-left: 0; }
  .facts div:nth-child(n + 3) { border-top: 1px solid var(--line); }
  .grid-3 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: repeat(3, 1fr); }
  .footer-about { grid-column: 1 / -1; }
}

@media (max-width: 820px) {
  .site-header .wrap { flex-wrap: wrap; }
  .site-header .btn { margin-left: auto; }
  .site-header .wrap > .btn { order: 1; }
  .menu-btn { order: 2; }
  .site-nav { order: 3; width: 100%; margin: 0; flex-wrap: wrap; padding-top: 4px; }
  .js .menu-btn {
    display: inline-flex; align-items: center; padding: 9px 14px; border: 1px solid rgba(255, 255, 255, .24); border-radius: 999px;
    background: rgba(255, 255, 255, .07); color: var(--text); font: 600 .9rem/1 var(--font); cursor: pointer;
  }
  .js .site-nav { display: none; flex-direction: column; padding: 8px 0 4px; }
  .js .site-nav.is-open { display: flex; }
  .js .site-header:has(.site-nav.is-open) { background: rgba(11, 10, 20, .94); border-color: var(--line); }
  .site-nav a { padding: 11px 13px; }
  .crumbs nav + nav { display: none; }
}

@media (max-width: 620px) {
  .facts, .grid-4, .steps { grid-template-columns: 1fr; }
  .facts div, .facts div + div { padding: 14px 0; border-left: 0; }
  .facts div + div { border-top: 1px solid var(--line); }
  .company-facts div { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .motion-btn { top: 72px; }
  .frame-wide { aspect-ratio: 4 / 3; }
  .site-header .wrap > .btn { display: none; }
  .menu-btn { margin-left: auto; }
  .site-nav .nav-cta { display: block; }
}

@media (prefers-reduced-motion: reduce) {
  .btn, .media video, .js .reveal { transition: none; }
  .btn:hover { transform: none; }
  .js .reveal { opacity: 1; transform: none; }
}
