/* Paradana — site styles */

/* ---------- Fonts (self-hosted, Latin + Latin Extended) ---------- */
@font-face { font-family: "Cormorant Garamond"; src: url("../fonts/cormorant.woff2") format("woff2"); font-weight: 300 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Cormorant Garamond"; src: url("../fonts/cormorant-italic.woff2") format("woff2"); font-weight: 300 700; font-style: italic; font-display: swap; }
@font-face { font-family: "Jost"; src: url("../fonts/jost.woff2") format("woff2"); font-weight: 300 700; font-style: normal; font-display: swap; }

/* ---------- Theme tokens ---------- */
:root {
  --accent-night: #E08A2E;          /* overridden from the backend */
  --serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --sans: "Jost", system-ui, -apple-system, "Segoe UI", sans-serif;
  --max: 1180px;
  --pad: 24px;
}
:root, :root[data-theme="night"] {
  --bg: #0B0A09; --surface: #14120F; --line: #2E2820;
  --text: #EFE9DF; --muted: #A39A8C;
  --accent: var(--accent-night); --on-accent: #0B0A09;
  color-scheme: dark;
}
:root[data-theme="day"] {
  --bg: #F6F1E8; --surface: #EEE6D8; --line: #D8CBB4;
  --text: #16130F; --muted: #5E554A;
  --accent: #9A5212; --on-accent: #FFFFFF;
  color-scheme: light;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="night"]):not([data-theme="day"]) {
    --bg: #F6F1E8; --surface: #EEE6D8; --line: #D8CBB4;
    --text: #16130F; --muted: #5E554A;
    --accent: #9A5212; --on-accent: #FFFFFF;
    color-scheme: light;
  }
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 90px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: var(--sans); font-weight: 300; font-size: 1rem; line-height: 1.7;
  transition: background-color .4s, color .4s;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
a:hover { opacity: .8; }
:focus-visible { outline: 1px solid var(--accent); outline-offset: 4px; }
input, select, textarea, button { font: inherit; color: inherit; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -9999px; top: 0; }
.skip:focus { left: 16px; top: 16px; z-index: 100; background: var(--accent); color: var(--on-accent); padding: 12px 16px; }

/* Logo per theme */
.logo-day { display: none; }
:root[data-theme="day"] .logo-night { display: none; }
:root[data-theme="day"] .logo-day { display: block; }
@media (prefers-color-scheme: light) {
  :root:not([data-theme="night"]):not([data-theme="day"]) .logo-night { display: none; }
  :root:not([data-theme="night"]):not([data-theme="day"]) .logo-day { display: block; }
}

/* ---------- Type helpers ---------- */
.label { margin: 0; font-size: .72rem; letter-spacing: .32em; text-transform: uppercase; color: var(--accent); }
.h2 { margin: 0; font-family: var(--serif); font-weight: 300; font-size: clamp(2.2rem, 4.4vw, 3.8rem); line-height: 1.08; white-space: pre-line; }
.muted { color: var(--muted); }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 10; background: var(--bg); border-bottom: 1px solid var(--line); transition: background-color .4s; }
.site-header .inner { max-width: 1280px; margin: 0 auto; padding: 14px var(--pad); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 32px; }
.brand img { height: 26px; width: auto; }
.nav { display: flex; flex-wrap: wrap; align-items: center; gap: 0 28px; font-size: .72rem; letter-spacing: .22em; text-transform: uppercase; }
.nav a { text-decoration: none; padding: 12px 0; }
.nav .nav-cta { color: var(--accent); }
.theme { display: flex; border: 1px solid var(--line); }
.theme button {
  min-height: 44px; padding: 0 16px; border: 0; cursor: pointer; background: transparent; color: var(--muted);
  font-size: .66rem; letter-spacing: .18em; text-transform: uppercase;
}
.theme button[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); }
@media (max-width: 760px) {
  .nav { order: 3; width: 100%; justify-content: space-between; gap: 0 16px; font-size: .64rem; letter-spacing: .14em; }
  .nav a:not(.nav-cta) { display: none; }
}

/* ---------- Hero ---------- */
.hero { min-height: 88vh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 120px var(--pad) 140px; gap: 40px; }
.hero .eyebrow { margin: 0; font-size: .72rem; letter-spacing: .42em; text-transform: uppercase; color: var(--accent); }
.hero .logo-wrap { width: min(720px, 86%); }
.hero .logo-wrap img { width: 100%; }
.hero .rule { width: 56px; height: 1px; background: var(--accent); }
.hero .line { margin: 0; max-width: 34rem; font-family: var(--serif); font-style: italic; font-weight: 300; font-size: clamp(1.5rem, 2.6vw, 2.1rem); line-height: 1.35; }
.btn-outline {
  margin-top: 16px; display: inline-flex; align-items: center; min-height: 52px; padding: 0 36px;
  border: 1px solid var(--accent); color: var(--accent); text-decoration: none;
  font-size: .74rem; letter-spacing: .28em; text-transform: uppercase; transition: background-color .3s, color .3s;
}
.btn-outline:hover { background: var(--accent); color: var(--on-accent); opacity: 1; }

/* ---------- Sections ---------- */
.section { border-top: 1px solid var(--line); }
.section .inner { max-width: var(--max); margin: 0 auto; padding: 120px var(--pad); }
.two-col { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: 48px 96px; align-items: start; }
.stack { display: flex; flex-direction: column; gap: 20px; }
.prose { display: flex; flex-direction: column; gap: 22px; font-size: 1.06rem; color: var(--muted); padding-top: 8px; }
.prose p { margin: 0; }
.prose .strong { color: var(--text); }

/* Glimpses */
.glimpses .inner { max-width: 1280px; display: flex; flex-direction: column; gap: 56px; }
.glimpses .head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 16px 48px; }
.glimpses .head p { margin: 0; max-width: 26rem; color: var(--muted); }
.grid3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 24px; }
.glimpse { margin: 0; display: flex; flex-direction: column; gap: 16px; }
.glimpse .frame { aspect-ratio: 3 / 4; background: var(--surface); border: 1px solid var(--line); overflow: hidden; }
.glimpse .frame img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s ease; }
.glimpse:hover .frame img { transform: scale(1.03); }
.glimpse figcaption { display: flex; justify-content: space-between; gap: 16px; font-family: var(--serif); font-style: italic; font-size: 1.3rem; }
.glimpse figcaption span:last-child { color: var(--accent); }

/* How it works */
.how { background: var(--surface); }
.how .inner { display: flex; flex-direction: column; gap: 64px; }
.how .head { align-items: center; text-align: center; }
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); margin: 0; padding: 0; list-style: none; }
.steps li { padding: 40px 36px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 16px; }
.steps .n { font-family: var(--serif); font-size: 3rem; line-height: 1; font-weight: 300; color: var(--accent); }
.steps h3 { margin: 0; font-size: .82rem; font-weight: 400; letter-spacing: .24em; text-transform: uppercase; }
.steps p { margin: 0; color: var(--muted); }

/* ---------- Form ---------- */
.form { display: flex; flex-direction: column; gap: 28px; }
.field { display: flex; flex-direction: column; gap: 8px; font-size: .68rem; letter-spacing: .24em; text-transform: uppercase; color: var(--muted); }
.field input, .field select, .field textarea {
  min-height: 48px; background: transparent; border: 0; border-bottom: 1px solid var(--line); border-radius: 0;
  color: var(--text); font-size: 1.05rem; letter-spacing: normal; text-transform: none; padding: 8px 0;
}
.field select { background: var(--bg); }
.field textarea { resize: vertical; min-height: 120px; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-bottom-color: var(--accent); }
.field ::placeholder { color: var(--muted); opacity: .6; }
.row2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 28px; }
.consent { display: flex; gap: 14px; align-items: flex-start; font-size: .9rem; color: var(--muted); cursor: pointer; }
.consent input { width: 18px; height: 18px; margin: 3px 0 0; accent-color: var(--accent); flex: none; }
.btn {
  align-self: flex-start; min-height: 54px; padding: 0 40px; border: 0; cursor: pointer;
  background: var(--accent); color: var(--on-accent);
  font-size: .74rem; letter-spacing: .28em; text-transform: uppercase; font-weight: 500;
}
.btn[disabled] { opacity: .6; cursor: wait; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.notice { padding: 32px; border: 1px solid var(--accent); display: flex; flex-direction: column; gap: 10px; }
.notice .title { margin: 0; font-family: var(--serif); font-size: 1.8rem; font-weight: 300; }
.notice p { margin: 0; color: var(--muted); }
.form-error { margin: 0; color: var(--accent); font-size: .95rem; }
[hidden] { display: none !important; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); }
.site-footer .inner { max-width: 1280px; margin: 0 auto; padding: 56px var(--pad) 64px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px 48px; font-size: .78rem; letter-spacing: .14em; color: var(--muted); }
.site-footer img { height: 22px; width: auto; opacity: .85; }
.site-footer a { text-decoration: none; padding: 12px 0; }
.site-footer .legal { display: flex; flex-wrap: wrap; gap: 8px 28px; align-items: center; }

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity 1s ease, transform 1s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .glimpse .frame img { transition: none; }
}
