/* ClearNote Sheets — layout and sections */

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

html { scroll-behavior: smooth; scroll-padding-top: 110px; }

body {
  position: relative;
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  font-weight: 400;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  overflow-x: clip;
  transition: background-color .7s ease, color .7s ease;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }
img, svg { display: block; }
.muted { color: var(--muted); }

.skip-link {
  position: absolute;
  left: 1rem;
  top: -6rem;
  z-index: 100;
  padding: .7rem 1rem;
  border-radius: var(--radius-sm);
  background: var(--btn);
  color: var(--btn-ink);
}
.skip-link:focus { top: 1rem; }

/* ---------- Ambient backdrop ---------- */
.backdrop {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: -1;
}
.backdrop__blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: var(--blob-opacity);
  transition: background-color .8s ease;
}
.backdrop__blob--1 { width: 640px; height: 640px; top: -180px; left: -160px; background: var(--blob-1); animation: drift-a 26s ease-in-out infinite alternate; }
.backdrop__blob--2 { width: 560px; height: 560px; top: 380px; right: -180px; background: var(--blob-2); animation: drift-b 30s ease-in-out infinite alternate; }
.backdrop__blob--3 { width: 720px; height: 720px; top: 1400px; left: 8%; background: var(--blob-3); animation: drift-a 34s ease-in-out infinite alternate-reverse; }

.backdrop__prism {
  position: absolute;
  width: 1100px;
  height: 1100px;
  top: -380px;
  left: 30%;
  border-radius: 50%;
  background: conic-gradient(from 210deg,
    rgba(255, 140, 130, 0), rgba(255, 176, 110, .2), rgba(255, 236, 150, .18),
    rgba(140, 226, 180, .18), rgba(120, 176, 255, .2), rgba(196, 140, 255, .18),
    rgba(255, 140, 130, 0) 62%);
  filter: blur(50px);
  opacity: var(--prism);
  animation: spin 70s linear infinite;
}
.backdrop__rays {
  position: absolute;
  inset: -30% -30% auto -30%;
  height: 1400px;
  background: repeating-linear-gradient(118deg,
    transparent 0 90px, rgba(255, 255, 255, var(--ray)) 118px, transparent 150px 270px);
  filter: blur(8px);
  animation: sweep 28s ease-in-out infinite alternate;
}
.backdrop__staff {
  position: absolute;
  top: 620px;
  left: 0;
  width: 100%;
  height: 220px;
  color: var(--staff);
}

/* ---------- Header / nav ---------- */
.site-header {
  position: sticky;
  top: calc(env(safe-area-inset-top, 0px) - 4px);
  z-index: 20;
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 20px 24px 0;
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 8px 8px 8px 18px;
  border-radius: var(--radius-pill);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-weight: var(--w-light);
  font-size: 1.3rem;
  letter-spacing: -.01em;
}
.brand__note { width: 30px; height: 36px; }
.brand--small { font-size: 1.05rem; }
.brand--small .brand__note { width: 22px; height: 26px; }

.nav__links {
  display: flex;
  gap: 30px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.nav__links a {
  font-size: .8rem;
  font-weight: var(--w-medium);
  letter-spacing: .06em;
  text-decoration: none;
  opacity: .85;
}
.nav__links a:hover { opacity: 1; }
.nav__actions { display: flex; align-items: center; gap: 8px; }

.theme-toggle {
  width: 46px;
  height: 46px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--ink);
  cursor: pointer;
}
.theme-toggle__sun { display: none; }
[data-theme="dark"] .theme-toggle__sun { display: block; }
[data-theme="dark"] .theme-toggle__moon { display: none; }

/* ---------- Page frame ---------- */
main,
.site-footer {
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Hero ---------- */
.hero {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 440px), 1fr));
  align-items: center;
  gap: 32px;
  padding: 72px 0 56px;
}
.hero__title {
  margin: 0 0 24px;
  font-weight: var(--w-light);
  font-size: clamp(2.1rem, 4.6vw, 3.9rem);
  line-height: 1.12;
  letter-spacing: .11em;
  text-transform: uppercase;   /* the brand tagline is set in tracked caps */
}
.hero__title span { display: block; }
.hero__lede {
  max-width: 30em;
  margin: 0 0 32px;
  font-size: 1.07rem;
  line-height: 1.7;
  color: var(--muted);
}
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; }

.hero__stage {
  position: relative;
  height: 540px;
  display: grid;
  place-items: center;
  perspective: 900px;
}
.hero__halo {
  position: absolute;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: conic-gradient(from 90deg, transparent, rgba(255, 214, 140, .35), rgba(150, 230, 190, .3), rgba(130, 180, 255, .35), rgba(200, 150, 255, .3), transparent);
  filter: blur(46px);
  opacity: var(--prism);
  animation: spin 40s linear infinite;
}
.hero__lens {
  position: absolute;
  right: 4%;
  bottom: 50px;
  width: 300px;
  height: 300px;
  border-radius: 50%;
}
.hero__lens--small {
  left: 6%;
  top: 40px;
  right: auto;
  bottom: auto;
  width: 140px;
  height: 140px;
}
.hero__note {
  position: relative;
  width: min(400px, 80vw);
  height: auto;
  filter: drop-shadow(0 26px 30px var(--shadow));
  transform: rotateX(var(--tilt-x, 0deg)) rotateY(var(--tilt-y, 0deg));
  transition: transform .6s var(--ease-out);
  animation: float 8s ease-in-out infinite;
}

/* ---------- Sections ---------- */
.section { padding: 56px 0; }
.section__title {
  margin: 0 0 12px;
  font-weight: var(--w-light);
  font-size: clamp(1.8rem, 3.2vw, 2.7rem);
  line-height: 1.15;
  letter-spacing: -.01em;
}

.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: 24px;
  margin: 32px 0 0;
  padding: 0;
  list-style: none;
}
.step {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 32px 30px 34px;
}
.step__n {
  font-weight: var(--w-light);
  font-size: 2.6rem;
  line-height: 1;
  color: var(--muted);
}
.step__title { margin: 0; font-weight: var(--w-medium); font-size: 1.1rem; }
.step p { margin: 0; font-size: .95rem; line-height: 1.65; color: var(--muted); }

.pricing {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 44px clamp(24px, 5vw, 64px);
  border-radius: var(--radius-lg);
}
.pricing p { margin: 0; }

/* ---------- Request ---------- */
.request {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr));
  gap: 40px;
  align-items: start;
}
.request__intro { position: sticky; top: 120px; }
.request__surfaces {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 32px;
  max-width: 420px;
}
.surface {
  aspect-ratio: 1;
  border-radius: 22%;
  display: grid;
  place-items: center;
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, .7), inset 0 -1px 1px rgba(0, 0, 0, .08), 0 10px 24px var(--shadow);
}
.surface .crystal { width: 56%; height: auto; }

.request-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: clamp(24px, 4vw, 40px);
  border-radius: var(--radius-lg);
  background: var(--glass-strong);
}
.field-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr));
  gap: 18px;
}
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: .85rem; font-weight: var(--w-medium); }
.optional { font-weight: 400; color: var(--muted); }
.field input,
.field textarea {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  font: inherit;
  font-size: 1rem;
  color: var(--ink);
  background: var(--field);
  border: 1px solid var(--field-line);
  border-radius: var(--radius-sm);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, .05);
  transition: border-color .2s ease, background-color .7s ease;
}
.field textarea { resize: vertical; min-height: 120px; }
.field input[type="file"] { padding: 10px; cursor: pointer; }
.field input::placeholder,
.field textarea::placeholder { color: var(--muted); opacity: .75; }
.field input:focus,
.field textarea:focus { border-color: var(--ink); outline: none; }
.field [aria-invalid="true"] { border-color: #B3412F; }
.hint { margin: 0; font-size: .82rem; color: var(--muted); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.request-form__footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  margin-top: 6px;
}
.form-status { margin: 0; font-size: .92rem; }
.form-status[data-state="error"] { color: #B3412F; }
[data-theme="dark"] .form-status[data-state="error"] { color: #F2A094; }
[data-theme="dark"] .field [aria-invalid="true"] { border-color: #F2A094; }

/* ---------- Footer ---------- */
.site-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 32px;
  padding-top: 40px;
  padding-bottom: max(40px, env(safe-area-inset-bottom));
  font-size: .9rem;
}
.site-footer p { margin: 0 auto 0 0; }

/* ---------- Motion ---------- */
@keyframes drift-a { to { transform: translate(120px, 80px) scale(1.12); } }
@keyframes drift-b { to { transform: translate(-140px, 60px) scale(.9); } }
@keyframes spin    { to { transform: rotate(360deg); } }
@keyframes sweep   { to { transform: translateX(10%); } }
@keyframes float   { 50% { translate: 0 -14px; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}

/* ---------- Small screens ---------- */
@media (max-width: 880px) {
  .nav__links { display: none; }
  .request__intro { position: static; }
}
@media (max-width: 540px) {
  .nav__cta { display: none; }
  .brand { font-size: 1.1rem; }
  .hero { padding-top: 48px; }
  .hero__stage { height: 420px; }
  .hero__lens { width: 220px; height: 220px; }
}

/* ---------- 404 ---------- */
.not-found {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  text-align: center;
}
.not-found .crystal { margin-bottom: 12px; }
.not-found p { margin: 0 0 16px; }
