/* Sortaura website — shared styles for every page. */

@font-face {
  font-family: "Playfair Display";
  src: url("../fonts/PlayfairDisplay.ttf") format("truetype");
  font-weight: 400 900;
  font-display: swap;
}

:root {
  /* Brand colours, taken from the logo and the app's Sortaura theme. */
  --night-950: #070818;
  --night-900: #0b0d26;
  --night-800: #141640;
  --ivory: #ede5d6;
  --ivory-deep: #e2d8c5;
  --header-space: 96px; /* room for the floating nav */
  --ink: #1c1a2e;
  --ink-soft: #55526a;
  --on-dark: #f4f3ff;
  --on-dark-soft: #c3c2dc;

  --gold: #c9963b;
  --gold-text: #8f6316;
  --gold-soft: #ecd394;
  --gold-button: linear-gradient(135deg, #f7e2a6 0%, #e2b85a 45%, #c9963b 100%);
  --on-gold: #2a1d05;
  --gold-gradient: linear-gradient(100deg, #a97a26 0%, #e2b85a 28%, #f6dc93 48%, #c9963b 70%, #f0cf7c 88%, #a87726 100%);
  --gold-gradient-deep: linear-gradient(100deg, #8a5c12 0%, #bf8a2a 30%, #ddb257 50%, #a8741f 72%, #cf9d3e 88%, #8a5c12 100%);
  --glass-dark: rgba(255, 255, 255, 0.06);
  --glass-dark-border: rgba(255, 255, 255, 0.12);
  --glass-light: rgba(255, 255, 255, 0.6);
  --glass-light-border: rgba(28, 26, 46, 0.08);

  --radius-card: 24px;
  --radius-pill: 999px;
  --page-max: 1180px;
  --gutter: clamp(16px, 4vw, 40px);
  --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-serif: "Playfair Display", Georgia, serif;
}

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

html { scroll-behavior: smooth; scroll-padding-top: var(--header-space); -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--ivory);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3 { line-height: 1.12; margin: 0; letter-spacing: -0.02em; }
p { margin: 0; }

:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 6px; }

.skip-link {
  position: absolute; left: 12px; top: -48px; z-index: 100;
  padding: 8px 14px; border-radius: 8px;
  background: var(--on-dark); color: var(--ink); text-decoration: none;
}
.skip-link:focus { top: 12px; }

.container { width: 100%; max-width: var(--page-max); margin: 0 auto; padding: 0 var(--gutter); }

/* Accent words: italic serif in gold. Each wrapped line gets its own padding
   so the slanted letters at line ends aren't clipped. */
.accent {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 600;
  background: var(--gold-gradient-deep);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
  padding: 0 0.12em 0.06em 0.04em;
  margin: 0 -0.08em 0 -0.04em;
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
}

/* Brighter gold on dark backgrounds. */
.dark .accent { background-image: var(--gold-gradient); }

.eyebrow {
  font-size: 0.8125rem; font-weight: 600;
  letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--gold-soft);
}

/* ---------- Dark sections ---------- */

.dark {
  position: relative;
  color: var(--on-dark);
  background:
    radial-gradient(60% 50% at 85% 20%, rgba(139, 92, 246, 0.35), transparent 70%),
    radial-gradient(50% 45% at 10% 80%, rgba(34, 211, 238, 0.18), transparent 70%),
    linear-gradient(180deg, var(--night-900), var(--night-950));
}
.dark p { color: var(--on-dark-soft); }

/* Wavy edge between sections (an SVG placed at the bottom of a section). */
.wave { display: block; width: 100%; height: clamp(40px, 7vw, 96px); margin-bottom: -1px; }
.wave { overflow: visible; }
.wave--ivory .wave__fill { fill: var(--ivory); }
/* Gold ribbon along the wave edge, with a soft shadow and a bright highlight. */
.wave__ribbon {
  fill: none; stroke: url(#gold-ribbon); stroke-width: 6; stroke-linecap: round;
  vector-effect: non-scaling-stroke; filter: url(#gold-shadow);
}
/* Top-of-page wave: a filled gold band, thick at the ends and thin in the middle. */
.wave--hero { height: clamp(76px, 12vw, 176px); }
.wave__band { fill: url(#gold-ribbon); filter: url(#gold-shadow); }
/* Thin second ribbon above the band, and a soft highlight on the lip's face. */
.wave__ribbon2 {
  fill: none; stroke: url(#gold-ribbon); stroke-width: 2.4; opacity: 0.85;
  vector-effect: non-scaling-stroke; filter: url(#gold-shadow);
}
.wave__lip { fill: url(#lip-shade); }
.wave__shine {
  fill: none; stroke: #fff6d6; stroke-width: 1.2; opacity: 0.75;
  vector-effect: non-scaling-stroke; transform: translateY(-1.5px);
}
.wave--flip { transform: scaleY(-1); margin: -1px 0 0; }

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

/* Floating glass pill that hovers over the page. */
.site-header {
  position: fixed; top: 14px; left: 0; right: 0; z-index: 50;
  color: var(--on-dark);
  pointer-events: none;
}
.site-header .container {
  pointer-events: auto;
  width: calc(100% - 2 * var(--gutter)); max-width: calc(var(--page-max) - 2 * 16px);
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px; min-height: 68px; padding: 0 12px 0 24px;
  border-radius: var(--radius-pill);
  background: linear-gradient(100deg, rgba(14, 16, 44, 0.82), rgba(34, 30, 64, 0.74));
  backdrop-filter: blur(18px) saturate(140%); -webkit-backdrop-filter: blur(18px) saturate(140%);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}
.brand img { height: 40px; width: auto; }

.nav { display: flex; align-items: center; gap: 28px; }
.nav a {
  text-decoration: none; font-size: 0.95rem; color: var(--on-dark-soft);
  padding: 6px 0; border-bottom: 2px solid transparent; transition: color .2s, border-color .2s;
}
.nav a:hover { color: var(--on-dark); }
.nav a[aria-current="page"] { color: var(--on-dark); border-color: var(--gold); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 46px; padding: 0 22px; border-radius: var(--radius-pill);
  font: 600 0.95rem/1 var(--font-sans); text-decoration: none; cursor: pointer;
  border: 0; transition: transform .2s, box-shadow .2s, background .2s;
}
.btn:hover { transform: translateY(-1px); }
.btn--primary { background: var(--gold-button); color: var(--on-gold); box-shadow: 0 8px 24px rgba(201, 150, 59, 0.35); }
.btn--ghost { background: transparent; color: var(--gold-text); border: 1.5px solid var(--gold); }
.dark .btn--ghost { color: var(--gold-soft); }
.nav .btn { color: var(--on-gold); border: 0; padding: 0 20px; }

.menu-toggle {
  display: none; width: 44px; height: 44px; border-radius: 12px;
  background: var(--glass-dark); border: 1px solid var(--glass-dark-border); color: var(--on-dark);
  cursor: pointer; align-items: center; justify-content: center;
}

@media (max-width: 860px) {
  .menu-toggle { display: inline-flex; }
  .site-header .container { padding: 0 10px 0 18px; min-height: 60px; }
  .nav {
    position: absolute; left: var(--gutter); right: var(--gutter); top: calc(100% + 8px);
    flex-direction: column; align-items: stretch; gap: 0;
    padding: 8px 20px 20px; border-radius: var(--radius-card);
    background: var(--night-950);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4);
    display: none;
  }
  .nav.is-open { display: flex; }
  .nav a { padding: 14px 0; border-bottom: 1px solid rgba(255, 255, 255, 0.06); }
  .nav a[aria-current="page"] { border-bottom-color: rgba(255, 255, 255, 0.06); color: var(--gold-soft); }
  .nav .btn { margin-top: 16px; border-bottom: 0; }
}

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

.hero { padding-top: calc(var(--header-space) + clamp(24px, 5vw, 64px)); }
.hero__grid {
  display: grid; grid-template-columns: 1fr 1.05fr; align-items: center;
  gap: clamp(24px, 4vw, 56px);
}
.hero h1 { font-size: clamp(2.4rem, 5.4vw, 4.2rem); margin: 16px 0 20px; }
.hero__lead { font-size: clamp(1.05rem, 1.6vw, 1.2rem); max-width: 34em; }

.store-buttons { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 32px; }
.store-btn {
  display: inline-flex; align-items: center; gap: 12px;
  min-height: 58px; padding: 8px 22px 8px 16px; border-radius: 14px;
  background: #000; color: #fff; text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.25);
}
.store-btn svg { width: 28px; height: 28px; flex: none; }
.store-btn small { display: block; font-size: 0.7rem; opacity: .75; letter-spacing: .04em; text-transform: uppercase; }
.store-btn strong { display: block; font-size: 1.1rem; line-height: 1.2; }
.store-badge { display: inline-flex; border-radius: 10px; }
.store-badge img { display: block; height: 58px; width: auto; }

.checks { display: flex; flex-wrap: wrap; gap: 10px 24px; margin: 28px 0 0; padding: 0; list-style: none; }
.checks li { display: flex; align-items: center; gap: 8px; font-size: 0.95rem; color: var(--on-dark); }
.checks svg { width: 18px; height: 18px; color: var(--gold); }

/* Three tilted phones. */
.phones { position: relative; aspect-ratio: 1.15; max-width: 640px; margin: 0 auto; width: 100%; }
.phones img { position: absolute; width: 46%; filter: drop-shadow(0 30px 40px rgba(0, 0, 0, 0.5)); }
.phones .phone--left  { left: 0;  top: 12%; transform: rotate(-8deg); }
.phones .phone--right { right: 0; top: 12%; transform: rotate(8deg); }
.phones .phone--centre { left: 27%; top: 0; width: 50%; z-index: 2; }
.phones::before {
  content: ""; position: absolute; inset: 15% 10%; z-index: -1;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.55), transparent 65%);
  filter: blur(30px);
}

@media (max-width: 860px) {
  .hero__grid { grid-template-columns: 1fr; text-align: center; }
  .hero__lead { margin: 0 auto; }
  .store-buttons, .checks { justify-content: center; }
  .phones { max-width: 460px; margin-top: 16px; }
}

/* ---------- Generic sections ---------- */

.section { padding-block: clamp(56px, 8vw, 104px); }
.section-head { text-align: center; max-width: 720px; margin: 0 auto clamp(32px, 5vw, 56px); }
.section-head h2 { font-size: clamp(1.9rem, 4vw, 2.9rem); }
.section-head p { margin-top: 14px; color: var(--ink-soft); font-size: 1.1rem; }
.dark .section-head p { color: var(--on-dark-soft); }

/* ---------- Feature cards ---------- */

.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; max-width: 980px; margin: 0 auto; }
@media (max-width: 760px) { .features { grid-template-columns: repeat(2, 1fr); gap: 12px; } .feature { padding: 22px 14px; } }
.feature {
  padding: 28px 22px; border-radius: var(--radius-card); text-align: center;
  background: linear-gradient(160deg, rgba(255, 252, 245, 0.85), rgba(244, 233, 212, 0.7));
  border: 2px solid rgba(201, 150, 59, 0.2);
  box-shadow: 0 10px 30px rgba(120, 84, 20, 0.08);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  transition: transform .25s, box-shadow .25s;
}
.feature:hover { transform: translateY(-3px); box-shadow: 0 16px 36px rgba(160, 110, 30, 0.18); }
.feature h3 { font-size: 1.2rem; margin: 16px 0 6px; }
.feature p { color: var(--ink-soft); font-size: 0.95rem; line-height: 1.5; }

.icon-badge {
  display: inline-flex; align-items: center; justify-content: center;
  width: 58px; height: 58px; border-radius: 50%;
  background: linear-gradient(140deg, rgba(247, 226, 166, 0.55), rgba(201, 150, 59, 0.22));
  border: 1px solid rgba(201, 150, 59, 0.25);
  color: var(--gold-text);
}
.icon-badge svg { width: 28px; height: 28px; stroke-width: 2.1; }

/* ---------- Themes ---------- */

.themes__grid { display: grid; grid-template-columns: 0.8fr 1.6fr; gap: clamp(28px, 5vw, 64px); align-items: center; }
.themes__copy h2 { font-size: clamp(1.9rem, 4vw, 2.9rem); }
.themes__copy p { margin: 18px 0 28px; font-size: 1.1rem; }
.theme-list { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(8px, 1.6vw, 20px); margin: 0; padding: 0; list-style: none; }
.theme-list figure { margin: 0; text-align: center; }
.theme-list img { filter: drop-shadow(0 18px 24px rgba(0, 0, 0, 0.45)); transition: transform .3s; }
.theme-list li:hover img { transform: translateY(-6px); }
.theme-list figcaption {
  display: inline-block; margin-top: 10px; padding: 4px 14px; border-radius: var(--radius-pill);
  font-size: 0.85rem; font-weight: 600; color: var(--on-dark);
  background: var(--glass-dark); border: 1px solid var(--glass-dark-border);
}

@media (max-width: 860px) {
  .themes__grid { grid-template-columns: 1fr; text-align: center; }
  .theme-list { grid-template-columns: repeat(2, 1fr); max-width: 420px; margin: 0 auto; }
}

/* ---------- Why Sortaura ---------- */

.why { display: grid; grid-template-columns: 1.3fr repeat(4, 1fr); gap: 0; align-items: start; }
.why__intro { padding-right: 28px; border-left: 4px solid var(--gold); padding-left: 22px; }
.why__intro h2 { font-size: clamp(1.8rem, 3.4vw, 2.5rem); }
.why__intro p { margin-top: 12px; color: var(--ink-soft); }
.why__item { padding: 4px 20px; text-align: center; border-left: 1px solid var(--glass-light-border); }
.why__item h3 { font-size: 1.05rem; margin: 12px 0 6px; }
.why__item p { font-size: 0.92rem; color: var(--ink-soft); line-height: 1.5; }
.why__item .icon-badge { width: 52px; height: 52px; }

@media (max-width: 960px) {
  .why { grid-template-columns: repeat(2, 1fr); gap: 32px 0; }
  .why__intro { grid-column: 1 / -1; padding-right: 0; }
  .why__item:nth-child(even) { border-left: 0; }
}
@media (max-width: 480px) {
  .why { grid-template-columns: 1fr; }
  .why__item { border-left: 0; }
}

/* ---------- FAQ (shared by landing and Help) ---------- */

.faq { max-width: 820px; margin: 0 auto; display: grid; gap: 12px; }
.faq details {
  border-radius: 18px; background: var(--glass-light); border: 2px solid var(--glass-light-border);
  padding: 0 22px;
}
.faq summary {
  list-style: none; cursor: pointer; padding: 18px 32px 18px 0; position: relative;
  font-weight: 600; font-size: 1.05rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; right: 4px; top: 50%; width: 10px; height: 10px;
  border-right: 2px solid var(--gold); border-bottom: 2px solid var(--gold);
  transform: translateY(-70%) rotate(45deg); transition: transform .2s;
}
.faq details[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
.faq details > div { padding: 0 0 20px; color: var(--ink-soft); }
.faq details > div p + p { margin-top: 10px; }
.faq-more { text-align: center; margin-top: 32px; }

/* ---------- Call to action ---------- */

/* Glows stay in the upper part so the section fades evenly into the footer. */
.cta {
  background:
    radial-gradient(55% 60% at 85% 10%, rgba(139, 92, 246, 0.32), transparent 70%),
    radial-gradient(40% 45% at 8% 35%, rgba(34, 211, 238, 0.14), transparent 70%),
    linear-gradient(180deg, var(--night-900), var(--night-950) 80%);
}
.cta .container { display: flex; align-items: center; justify-content: space-between; gap: 32px; flex-wrap: wrap; }
.cta h2 { font-size: clamp(1.8rem, 3.6vw, 2.6rem); }
.cta p { margin-top: 10px; max-width: 34em; }
.cta .store-buttons { margin-top: 0; }

/* ---------- Footer ---------- */

.site-footer { background: var(--night-950); color: var(--on-dark-soft); padding: 36px 0 28px; font-size: 0.92rem; }
.site-footer .container { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px 32px; }
.site-footer img { height: 36px; width: auto; }
.footer-links { display: flex; flex-wrap: wrap; gap: 10px 28px; margin: 0; padding: 0; list-style: none; }
.footer-links a { text-decoration: none; color: var(--on-dark-soft); }
.footer-links a:hover { color: var(--on-dark); }
.footer-legal { width: 100%; padding-top: 20px; border-top: 1px solid rgba(255, 255, 255, 0.08); font-size: 0.85rem; color: #8d8ca8; }

/* ---------- Inner pages (Help, Terms, Privacy) ---------- */

.page-hero { padding: calc(var(--header-space) + clamp(28px, 5vw, 64px)) 0 0; text-align: center; }
.page-hero h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); margin-top: 12px; }
.page-hero p { margin: 14px auto 0; max-width: 36em; font-size: 1.1rem; }

.help-group { max-width: 820px; margin: 0 auto 48px; }
.help-group h2 { font-size: 1.5rem; margin-bottom: 16px; }
.help-nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin: 0 auto 48px; padding: 0; list-style: none; }
.help-nav a {
  display: inline-block; padding: 8px 16px; border-radius: var(--radius-pill);
  background: var(--glass-light); border: 2px solid var(--glass-light-border);
  text-decoration: none; font-size: 0.92rem; font-weight: 600;
}
.help-nav a:hover { border-color: var(--gold); }

.contact-card {
  max-width: 820px; margin: 0 auto; padding: 32px; border-radius: var(--radius-card); text-align: center;
  background: var(--night-900); color: var(--on-dark);
}
.contact-card p { color: var(--on-dark-soft); margin: 10px 0 22px; }

.prose { max-width: 760px; margin: 0 auto; }
.prose h2 { font-size: 1.4rem; margin: 40px 0 12px; }
.prose p, .prose li { color: var(--ink-soft); }
.prose p + p { margin-top: 12px; }
.prose ul { padding-left: 1.2em; margin: 12px 0; }
.prose li + li { margin-top: 6px; }
.prose a { color: var(--gold-text); }
.prose .meta { font-size: 0.92rem; color: var(--ink-soft); }

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