/* Sun Path Digital landing page. Mobile first. */

:root {
  --paper: #F3EADB;
  --ink: #1F1712;
  --muted: #6B5B4D;
  --sun: #FF5E1A;
  --line: rgba(31, 23, 18, 0.18);
  --paper-dim: rgba(243, 234, 219, 0.7);
  --gutter: clamp(20px, 4.5vw, 64px);
  --max: 1360px;
  --header-h: 64px;
  --display: "Besley", Georgia, "Times New Roman", serif;
  --text: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --ease: cubic-bezier(0.2, 0.7, 0.1, 1);
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1.0625rem/1.55 var(--text);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg { display: block; }
img { max-width: 100%; height: auto; }
a { color: inherit; }
p, ul, ol, dl, dd, figure { margin: 0; }

h1, h2, h3 {
  margin: 0;
  font-family: var(--display);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.02em;
}

::selection { background: var(--sun); color: var(--ink); }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
[tabindex="-1"]:focus { outline: none; }

section[id] { scroll-margin-top: var(--header-h); }

@media (prefers-reduced-motion: no-preference) {
  html:not(.lenis) { scroll-behavior: smooth; }
  .js .hero-inner { visibility: hidden; }
}

/* Lenis smooth scroll */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }

.skip {
  position: fixed; left: 12px; top: 12px; z-index: 100;
  padding: 0.75rem 1rem; border-radius: 8px;
  background: var(--ink); color: var(--paper);
  transform: translateY(-200%);
}
.skip:focus { transform: none; }

.wrap { max-width: var(--max); margin-inline: auto; }
.section { padding: clamp(4.5rem, 11vw, 10rem) var(--gutter); }

/* SplitText line masks: room for descenders while lines slide in, without changing spacing. */
.hero-title > div,
[data-lines] > div { padding-bottom: 0.14em; margin-bottom: -0.14em; }

.section-title {
  font-size: clamp(2.25rem, 5.5vw, 4.75rem);
  font-weight: 650;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

/* ---------- Buttons and links ---------- */

.btn {
  position: relative; isolation: isolate; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 50px; padding: 0 1.6rem;
  border: 0; border-radius: 999px;
  background: var(--ink); color: var(--paper);
  font: 600 1rem/1 var(--text);
  text-decoration: none; cursor: pointer;
  transition: color 0.4s var(--ease);
}
.btn::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  border-radius: inherit; background: var(--sun);
  transform: translateY(101%);
  transition: transform 0.5s var(--ease);
}
.btn:hover { color: var(--ink); }
.btn:hover::before { transform: translateY(0); }
.btn:disabled { opacity: 0.6; cursor: progress; }
.btn-small { min-height: 40px; padding: 0 1.1rem; font-size: 0.9375rem; }
.btn-sun { background: var(--sun); color: var(--ink); }
.btn-sun::before { background: var(--paper); }

.link {
  font-weight: 600;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.35em;
  transition: text-underline-offset 0.3s var(--ease);
}
.link:hover { text-underline-offset: 0.15em; }

/* ---------- Header ---------- */

.site-header {
  position: fixed; inset: 0 0 auto; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  min-height: var(--header-h);
  padding: 0.6rem var(--gutter);
  background: rgba(243, 234, 219, 0.9);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s;
}
.site-header.is-scrolled { border-bottom-color: var(--line); }

.brand {
  display: inline-flex; align-items: center; gap: 0.6rem;
  font-family: var(--display); font-weight: 700; font-size: 1.125rem;
  letter-spacing: -0.01em; text-decoration: none;
}
.brand-mark { width: 28px; height: 16px; overflow: visible; }
.brand-arc {
  fill: none; stroke: var(--ink); stroke-width: 1.6;
  stroke-linecap: round; stroke-dasharray: 0 3.3;
}
.brand-sun { fill: var(--sun); }

.site-nav { display: flex; align-items: center; gap: clamp(1rem, 2.2vw, 2.25rem); font-weight: 500; font-size: 0.9375rem; }
.site-nav a:not(.btn) {
  text-decoration: none;
  padding-block: 0.4rem;
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat;
  transition: background-size 0.35s var(--ease);
}
.site-nav a:not(.btn):hover { background-size: 100% 1px; }

@media (max-width: 759px) {
  .nav-wide { display: none; }
}

/* ---------- Hero ---------- */

.hero { padding: calc(var(--header-h) + 3vh) var(--gutter) clamp(2.5rem, 7vh, 4.5rem); }

.hero-inner {
  max-width: var(--max); margin-inline: auto;
  display: grid;
  grid-template-areas: "sky" "horizon" "title" "foot";
  text-align: center;
}

.sky { grid-area: sky; position: relative; width: 100%; aspect-ratio: 1000 / 420; }
.sky-svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.sky-arc {
  fill: none; stroke: var(--ink); stroke-width: 2.5;
  stroke-linecap: round; stroke-dasharray: 0 13;
  vector-effect: non-scaling-stroke;
}
.sky-sun { fill: var(--sun); }

.horizon { grid-area: horizon; height: 1px; background: var(--ink); }

.hero-title {
  grid-area: title;
  max-width: 15ch;
  margin: clamp(1.5rem, 5vw, 2.5rem) auto 0;
  font-size: clamp(2.6rem, 10.5vw, 7.25rem);
  font-weight: 650;
  line-height: 0.95;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

.hero-foot {
  grid-area: foot;
  display: grid; justify-items: center; gap: 1.5rem;
  margin-top: clamp(1.5rem, 5vw, 2.5rem);
}
.hero-intro { max-width: 42ch; color: var(--muted); font-size: clamp(1.0625rem, 1.3vw, 1.1875rem); }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 1rem 1.75rem; }

@media (min-width: 900px) {
  .hero-inner { grid-template-areas: "sky" "horizon" "foot"; }
  .sky { max-height: 64svh; }
  .hero-title {
    grid-area: sky; align-self: end; position: relative;
    margin: 0 auto clamp(1.25rem, 2.6vw, 2.5rem);
    font-size: clamp(3rem, 5.9vw, 7rem);
  }
  .hero-foot {
    grid-template-columns: minmax(0, 1fr) auto; align-items: center;
    justify-items: start; text-align: left;
    margin-top: 2rem;
  }
}

/* ---------- Photo window ---------- */

.window { padding: 0 0 clamp(1rem, 4vw, 3rem); }
.window-frame { position: relative; overflow: hidden; height: clamp(320px, 80svh, 920px); }
.window-frame img {
  position: absolute; left: 0; top: -12%;
  width: 100%; height: 124%; object-fit: cover;
}

/* ---------- Statement ---------- */

.statement-lead {
  max-width: 22ch;
  font-family: var(--display); font-weight: 500;
  font-size: clamp(1.9rem, 4.6vw, 4.25rem);
  line-height: 1.1; letter-spacing: -0.02em;
}
.statement-sub { max-width: 44ch; margin-top: 2rem; color: var(--muted); font-size: clamp(1.0625rem, 1.3vw, 1.1875rem); }

@media (min-width: 900px) {
  .statement .wrap { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 24px; }
  .statement-lead { grid-column: 1 / span 10; }
  .statement-sub { grid-column: 7 / span 5; margin-top: 3rem; }
}

/* ---------- What every site comes with ---------- */

.included { padding-top: clamp(1rem, 4vw, 3rem); }
.included-list {
  list-style: none; padding: 0;
  margin-top: clamp(2.5rem, 5vw, 4rem);
  display: grid; column-gap: clamp(2rem, 4vw, 4rem);
}
.included-list li { display: grid; gap: 0.5rem; align-content: start; padding: 1.5rem 0 2rem; border-top: 1px solid var(--line); }
.included-list h3 { font-size: clamp(1.375rem, 2vw, 1.75rem); line-height: 1.1; letter-spacing: -0.015em; }
.included-list p { max-width: 38ch; color: var(--muted); }

@media (min-width: 640px) {
  .included-list { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 1000px) {
  .included .wrap { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 24px; align-items: start; }
  .included .section-title { grid-column: 1 / span 4; position: sticky; top: calc(var(--header-h) + 2.5rem); }
  .included-list { grid-column: 6 / span 7; margin-top: 0; }
}

/* ---------- Concept work ---------- */

.section-head { display: grid; gap: 1.25rem; }
.section-head p { max-width: 46ch; color: var(--muted); font-size: clamp(1.0625rem, 1.3vw, 1.1875rem); }

.work-grid { display: grid; gap: 3.5rem; margin-top: clamp(2.5rem, 6vw, 5rem); }
.work-media { position: relative; overflow: hidden; aspect-ratio: 4 / 5; background: #E4D6C1; }
.work-media img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 1.1s var(--ease);
}
.work-item:hover .work-media img { transform: scale(1.045); }
.tag {
  position: absolute; left: 14px; top: 14px;
  padding: 0.4rem 0.75rem; border-radius: 999px;
  background: var(--paper); color: var(--ink);
  font-size: 0.8125rem; font-weight: 600; line-height: 1;
}
.work-item h3 { margin-top: 1.25rem; font-size: clamp(1.5rem, 2.3vw, 2rem); letter-spacing: -0.015em; }
.work-item p { margin-top: 0.45rem; max-width: 34ch; color: var(--muted); }
.work-item .work-status {
  margin-top: 0.75rem; color: var(--ink); font-size: 0.9375rem; font-weight: 600;
  text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.35em;
  transition: text-underline-offset 0.3s var(--ease);
}
.work-item:hover .work-status { text-underline-offset: 0.15em; }
/* The title link stretches over the whole card, so the photo is clickable too. */
.work-item { position: relative; }
.work-item h3 a { text-decoration: none; }
.work-item h3 a::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.work-item h3 a:focus-visible { outline: none; }
.work-item:has(h3 a:focus-visible) { outline: 2px solid var(--ink); outline-offset: 6px; }

@media (min-width: 760px) {
  .section-head { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: end; column-gap: 24px; }
  .work-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(1.25rem, 2.5vw, 2.5rem); align-items: start; }
  .work-item:nth-child(2) { margin-top: clamp(3rem, 9vw, 9rem); }
  .work-item:nth-child(3) { margin-top: clamp(1.5rem, 4.5vw, 4.5rem); }
}

/* ---------- How it works ---------- */

.steps { list-style: none; padding: 0; margin-top: clamp(2.5rem, 5vw, 4rem); display: grid; gap: 2.5rem; }
.steps li { display: grid; gap: 0.65rem; align-content: start; padding-top: 1.25rem; border-top: 1.5px solid var(--ink); }
.step-num { font-family: var(--display); font-size: clamp(2.75rem, 4.5vw, 4rem); font-weight: 600; line-height: 1; letter-spacing: -0.03em; }
.steps h3 { font-size: clamp(1.375rem, 2vw, 1.75rem); letter-spacing: -0.015em; }
.steps p { max-width: 34ch; color: var(--muted); }
.how-note {
  max-width: 26ch; margin-top: clamp(3rem, 6vw, 5rem);
  font-family: var(--display); font-weight: 500;
  font-size: clamp(1.5rem, 2.6vw, 2.25rem); line-height: 1.15; letter-spacing: -0.015em;
}

@media (min-width: 640px) {
  .steps { grid-template-columns: 1fr 1fr; column-gap: 2rem; }
}
@media (min-width: 1000px) {
  .steps { grid-template-columns: repeat(4, minmax(0, 1fr)); column-gap: clamp(1.5rem, 2.5vw, 2.5rem); }
}

/* ---------- Prices: a shop price board ---------- */

.prices { background: var(--ink); color: var(--paper); }
.prices :focus-visible { outline-color: var(--sun); }

.board { max-width: 1000px; margin-top: clamp(2.5rem, 5vw, 4rem); display: grid; gap: clamp(1.75rem, 3vw, 2.5rem); }
.board-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: baseline; column-gap: 0.9rem; }
.board-row dt,
.board-price {
  font-family: var(--display); font-weight: 600;
  font-size: clamp(1.375rem, 3.2vw, 2.75rem);
  line-height: 1.1; letter-spacing: -0.015em;
}
.board-row dt { display: flex; align-items: baseline; gap: 0.9rem; min-width: 0; }
.board-row dt::after {
  content: ""; flex: 1; min-width: 1.25rem;
  border-bottom: 2px dotted rgba(243, 234, 219, 0.4);
}
.board-price { color: var(--sun); white-space: nowrap; font-variant-numeric: lining-nums; }
.board-note { grid-column: 1 / -1; margin-top: 0.4rem; color: var(--paper-dim); }

.board-foot {
  max-width: 1000px; margin-top: clamp(2.5rem, 5vw, 4rem);
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.25rem 2rem;
  padding-top: 1.75rem; border-top: 1px solid rgba(243, 234, 219, 0.2);
}
.board-foot p { font-size: 1.125rem; }

/* ---------- Quote form ---------- */

.quote .wrap { display: grid; gap: clamp(2.5rem, 5vw, 4rem); }
.quote-intro p { max-width: 36ch; margin-top: 1.25rem; color: var(--muted); font-size: clamp(1.0625rem, 1.3vw, 1.1875rem); }
.quote-intro .quote-direct { font-size: 1rem; }
.quote-direct a { color: var(--ink); font-weight: 600; text-underline-offset: 0.25em; }

.quote-form { display: grid; gap: 1.5rem; }
.field { display: grid; gap: 0.35rem; min-width: 0; }
.field label, .field legend { font-weight: 600; font-size: 0.9375rem; }
.optional { font-weight: 400; color: var(--muted); }

.field input:not([type="radio"]),
.field textarea {
  width: 100%; min-height: 48px; padding: 0.65rem 0;
  border: 0; border-bottom: 1.5px solid var(--ink); border-radius: 0;
  background: transparent; color: var(--ink);
  font: inherit;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.field textarea { resize: vertical; min-height: 120px; }
.field input:not([type="radio"]):focus-visible,
.field textarea:focus-visible { outline: none; box-shadow: 0 2px 0 0 var(--ink); }
.field ::placeholder { color: #8C7D6E; }

.choice { border: 0; padding: 0; margin: 0; }
.choice legend { padding: 0; margin-bottom: 0.5rem; }
.choice-options { display: flex; flex-wrap: wrap; gap: 0.25rem 1.5rem; }
.choice-options label { display: inline-flex; align-items: center; gap: 0.55rem; min-height: 44px; font-weight: 500; font-size: 1rem; cursor: pointer; }
.choice-options input { width: 1.15rem; height: 1.15rem; margin: 0; accent-color: var(--ink); }

.hp { display: none; }

.form-end { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.5rem; }
.form-status { font-weight: 600; }
.form-error { padding: 1rem 1.1rem; border-left: 3px solid var(--sun); background: rgba(255, 94, 26, 0.1); }
.form-error a { font-weight: 600; }

@media (min-width: 640px) {
  .quote-form { grid-template-columns: 1fr 1fr; column-gap: 2rem; }
  .choice, .field-wide, .form-end, .form-error { grid-column: 1 / -1; }
}
@media (min-width: 1000px) {
  .quote .wrap { grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 24px; align-items: start; }
  .quote-intro { grid-column: 1 / span 5; }
  .quote-form { grid-column: 7 / span 6; }
}

/* ---------- Footer: the sun sets ---------- */

.site-footer { padding: clamp(4rem, 10vw, 8rem) var(--gutter) 2rem; background: var(--ink); color: var(--paper); overflow: hidden; }
.sunset { width: 100%; height: auto; }
.sunset-sun { fill: var(--sun); }
.footer-horizon { height: 1px; background: rgba(243, 234, 219, 0.5); }
.footer-mark {
  margin-top: clamp(1.25rem, 3vw, 2rem);
  font-family: var(--display); font-weight: 650;
  font-size: clamp(2rem, 10.4vw, 10.75rem);
  line-height: 0.9; letter-spacing: -0.035em;
  white-space: nowrap;
}
.footer-row {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.75rem 2rem;
  margin-top: clamp(2rem, 5vw, 3.5rem);
  color: var(--paper-dim); font-size: 0.9375rem;
}
.footer-row a { color: var(--paper); text-underline-offset: 0.25em; }
.site-footer :focus-visible { outline-color: var(--sun); }

/* ---------- Mobile quote button ---------- */

.dock { display: none; }

@media (max-width: 759px) {
  .dock {
    position: fixed; z-index: 60;
    left: 16px; right: 16px; bottom: calc(12px + env(safe-area-inset-bottom));
    display: flex; align-items: center; justify-content: center;
    min-height: 54px; border-radius: 999px;
    background: var(--sun); color: var(--ink);
    font-weight: 600; text-decoration: none;
    box-shadow: 0 10px 30px rgba(31, 23, 18, 0.28);
    transition: transform 0.45s var(--ease), opacity 0.3s;
  }
  /* With JS it starts hidden and slides in after the hero; without JS it just stays put. */
  .js .dock:not(.is-shown) { transform: translateY(160%); opacity: 0; pointer-events: none; }
  .site-footer { padding-bottom: 6.5rem; }
}
