/* ==========================================================================
   Curio — Antique Identifier & Curator
   Shared design system (landing page + guide cluster)
   Brand: warm editorial surfaces, confident navy, and restrained bronze accents
   ========================================================================== */

:root {
  --parchment:   #F8F6F1;
  --parchment-2: #F0EDE6;
  --ivory:       #FFFFFF;
  --card:        #FFFFFF;
  --espresso:    #14213D;
  --brown:       #31425D;
  --muted:       #667085;
  --line:        #E4E1DA;
  --rust:        #2F5D8C;
  --rust-dark:   #244A70;
  --rust-soft:   #E8EEF3;
  --sage:        #82958B;
  --gold:        #B4834A;
  --white:       #ffffff;

  --shadow-sm: 0 6px 20px rgba(20, 33, 61, .06);
  --shadow-md: 0 18px 44px rgba(20, 33, 61, .11);
  --shadow-lg: 0 30px 76px rgba(20, 33, 61, .19);

  --radius:    22px;
  --radius-lg: 32px;
  --maxw: 1120px;

  --serif: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --sans:  "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--espresso);
  background:
    radial-gradient(circle at 88% 6%, rgba(130,149,139,.15), transparent 26rem),
    radial-gradient(circle at 4% 44%, rgba(180,131,74,.1), transparent 24rem),
    var(--parchment);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }

a { color: var(--rust-dark); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 { font-family: var(--serif); color: var(--espresso); line-height: 1.08; margin: 0 0 .5em; font-weight: 700; letter-spacing: -.045em; }
h1 { font-size: clamp(2.1rem, 5.2vw, 3.6rem); letter-spacing: -.5px; }
h2 { font-size: clamp(1.7rem, 3.6vw, 2.6rem); letter-spacing: -.3px; }
h3 { font-size: clamp(1.15rem, 2vw, 1.4rem); }
p  { margin: 0 0 1.1em; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 22px; }
.narrow { max-width: 760px; }

.eyebrow {
  font-family: var(--sans);
  text-transform: uppercase;
  letter-spacing: .22em;
  font-size: .74rem;
  font-weight: 700;
  color: var(--rust);
  margin: 0 0 14px;
}

section { padding: 76px 0; }
.section-head { text-align: center; max-width: 680px; margin: 0 auto 46px; }
.section-head p { color: var(--muted); font-size: 1.08rem; margin: 0; }

/* ----- Buttons ------------------------------------------------------------ */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--sans); font-weight: 600; font-size: 1rem;
  padding: 15px 26px; border-radius: 999px; cursor: pointer;
  border: 1px solid transparent; transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
  text-decoration: none;
}
.btn:hover { text-decoration: none; transform: translateY(-2px); }
.btn-primary { background: linear-gradient(135deg, var(--rust), var(--rust-dark)); color: #fff; box-shadow: 0 12px 28px rgba(20,33,61,.22); }
.btn-primary:hover { background: linear-gradient(135deg, var(--gold), #956a39); color: #fff; }
.btn-ghost { background: transparent; color: var(--espresso); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--rust); color: var(--rust-dark); }

/* App Store badge button */
.appstore {
  display: inline-flex; align-items: center; gap: 12px;
  background: linear-gradient(135deg, var(--rust), var(--rust-dark)); color: var(--ivory);
  padding: 12px 22px 12px 20px; border-radius: 14px; text-decoration: none;
  box-shadow: var(--shadow-md); transition: transform .15s ease, box-shadow .15s ease;
}
.appstore:hover { text-decoration: none; transform: translateY(-2px); box-shadow: var(--shadow-lg); color: var(--ivory); }
.appstore svg { width: 30px; height: 30px; flex: none; }
.appstore > span { display: flex; flex-direction: column; align-items: flex-start; }
.appstore .as-small { font-size: .68rem; letter-spacing: .04em; opacity: .82; line-height: 1.2; }
.appstore .as-big { font-family: var(--sans); font-size: 1.28rem; font-weight: 700; line-height: 1.05; }

/* ----- Nav ---------------------------------------------------------------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(248,246,241,.9); backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { display: flex; align-items: center; gap: 11px; font-family: var(--sans); font-weight: 800; font-size: 1.25rem; color: var(--espresso); text-decoration: none; }
.brand:hover { text-decoration: none; }
.brand img { width: 38px; height: 38px; border-radius: 12px; box-shadow: var(--shadow-sm); }
.brand small { display:block; font-family: var(--sans); font-weight: 500; font-size: .62rem; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); margin-top: 1px; }
.nav-links { display: flex; align-items: center; gap: 30px; }
.nav-links a { color: var(--brown); font-weight: 500; font-size: .96rem; text-decoration: none; }
.nav-links a:hover { color: var(--rust-dark); }
.nav-links .studio-link { position: relative; margin-right: 3px; color: var(--muted); font-size: .8rem; font-weight: 600; letter-spacing: .04em; }
.nav-links .studio-link::after { content: ""; position: absolute; right: -17px; top: 50%; width: 1px; height: 18px; background: var(--line); transform: translateY(-50%); }
.nav-cta { padding: 10px 20px !important; font-size: .92rem !important; }
@media (max-width: 820px) { .nav-links a:not(.nav-cta) { display: none; } }

/* ----- Hero --------------------------------------------------------------- */
.hero { position: relative; padding: 70px 0 40px; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: 0;
  background:
    radial-gradient(60% 55% at 82% 12%, rgba(47,93,140,.16), transparent 60%),
    radial-gradient(50% 50% at 8% 90%, rgba(180,131,74,.1), transparent 60%);
}
.hero .wrap { position: relative; z-index: 1; }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 48px; align-items: center; }
.hero h1 span { color: var(--rust); }
.hero-sub { font-size: 1.2rem; color: var(--brown); max-width: 33ch; margin-bottom: 26px; }
.hero-cta { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.hero-trust { display: flex; gap: 26px; margin-top: 28px; flex-wrap: wrap; }
.hero-trust div { font-size: .86rem; color: var(--muted); }
.hero-trust b { display: block; font-family: var(--serif); font-size: 1.5rem; color: var(--espresso); }

.phone-stack { position: relative; display: flex; justify-content: center; }
.phone-stack img { width: 100%; max-width: 340px; border: 9px solid rgba(255,255,255,.78); border-radius: 38px; box-shadow: var(--shadow-lg); transform: rotate(2deg); }

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; text-align: center; }
  .hero-sub { margin-left: auto; margin-right: auto; }
  .hero-cta, .hero-trust { justify-content: center; }
  .phone-stack { order: -1; }
}

/* ----- Category strip ----------------------------------------------------- */
.strip { margin: 0 22px; background: linear-gradient(135deg, #2f5d8c, #14213d); color: var(--ivory); padding: 34px 0; border-radius: var(--radius-lg); box-shadow: var(--shadow-md); }
.strip p { text-align: center; color: rgba(255,255,255,.76); font-size: .8rem; letter-spacing: .18em; text-transform: uppercase; margin: 0 0 16px; }
.chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.chip { background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.2); color: var(--ivory); padding: 8px 16px; border-radius: 999px; font-size: .9rem; }

/* ----- Screenshot gallery ------------------------------------------------- */
.shots { background: rgba(240,237,230,.8); }
.shots-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 26px; }
.shot { text-align: center; }
.shot img { border: 7px solid rgba(255,255,255,.86); border-radius: 30px; box-shadow: var(--shadow-md); margin-bottom: 16px; transition: transform .2s ease; }
.shot:hover img { transform: translateY(-6px); }
.shot h3 { font-size: 1.08rem; margin-bottom: 4px; }
.shot p { color: var(--muted); font-size: .9rem; margin: 0; }
@media (max-width: 860px) { .shots-row { grid-template-columns: repeat(2, 1fr); gap: 22px 18px; } }

/* ----- How it works ------------------------------------------------------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.step { background: rgba(255,255,255,.9); border: 1px solid var(--line); border-radius: var(--radius); padding: 32px 28px; box-shadow: var(--shadow-sm); position: relative; }
.step-n { font-family: var(--serif); font-size: 2.4rem; color: var(--rust); opacity: .35; line-height: 1; }
.step h3 { margin: 10px 0 8px; }
.step p { color: var(--muted); margin: 0; }
@media (max-width: 780px) { .steps { grid-template-columns: 1fr; } }

/* ----- Features ----------------------------------------------------------- */
.features { background: rgba(240,237,230,.7); }
.feat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.feat { background: rgba(255,255,255,.92); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow-sm); }
.feat .ic { width: 46px; height: 46px; border-radius: 14px; background: var(--rust-soft); color: var(--rust-dark); display: flex; align-items: center; justify-content: center; margin-bottom: 14px; font-size: 1.35rem; }
.feat h3 { font-size: 1.14rem; margin-bottom: 6px; }
.feat p { color: var(--muted); margin: 0; font-size: .96rem; }
@media (max-width: 900px) { .feat-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .feat-grid { grid-template-columns: 1fr; } }

/* ----- Guides ------------------------------------------------------------- */
.guide-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.guide-card { display: block; background: rgba(255,255,255,.92); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow-sm); text-decoration: none; color: inherit; transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease; }
.guide-card:hover { text-decoration: none; transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--rust); }
.guide-card .g-kicker { font-size: .72rem; letter-spacing: .16em; text-transform: uppercase; color: var(--rust); font-weight: 700; }
.guide-card h3 { margin: 10px 0 6px; font-size: 1.24rem; }
.guide-card p { color: var(--muted); margin: 0 0 14px; font-size: .95rem; }
.guide-card .g-link { color: var(--rust-dark); font-weight: 600; font-size: .92rem; }
@media (max-width: 900px) { .guide-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .guide-grid { grid-template-columns: 1fr; } }

/* ----- FAQ ---------------------------------------------------------------- */
.faq { background: rgba(240,237,230,.8); }
.faq-list { max-width: 800px; margin: 0 auto; }
details.qa { background: var(--card); border: 1px solid var(--line); border-radius: 18px; margin-bottom: 14px; box-shadow: var(--shadow-sm); overflow: hidden; }
details.qa summary { list-style: none; cursor: pointer; padding: 20px 24px; font-family: var(--serif); font-size: 1.14rem; font-weight: 700; color: var(--espresso); display: flex; justify-content: space-between; align-items: center; gap: 16px; }
details.qa summary::-webkit-details-marker { display: none; }
details.qa summary::after { content: "+"; font-family: var(--sans); font-size: 1.5rem; color: var(--rust); transition: transform .2s ease; flex: none; }
details.qa[open] summary::after { transform: rotate(45deg); }
details.qa .qa-body { padding: 0 24px 22px; color: var(--brown); }
details.qa .qa-body p { margin: 0 0 12px; }
.learn-more { display: inline-block; font-weight: 600; color: var(--rust-dark); font-size: .92rem; }
.learn-more::after { content: " →"; }

/* ----- CTA band ----------------------------------------------------------- */
.cta { margin: 0 22px 22px; background: radial-gradient(circle at 82% 10%, rgba(255,255,255,.14), transparent 24%), radial-gradient(circle at 12% 100%, rgba(180,131,74,.25), transparent 26%), linear-gradient(135deg, #2f5d8c, #14213d); color: var(--ivory); text-align: center; border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); }
.cta h2 { color: var(--ivory); }
.cta p { color: rgba(255,255,255,.74); max-width: 46ch; margin: 0 auto 26px; font-size: 1.08rem; }
.cta .appstore { background: var(--ivory); color: var(--rust-dark); }
.cta .appstore:hover { color: var(--espresso); }
.cta-mascot { width: 128px; height: 128px; border-radius: 24px; margin: 0 auto 22px; box-shadow: var(--shadow-lg); }

/* ----- Footer ------------------------------------------------------------- */
.footer { background: #101b33; color: #c8d0dc; padding: 56px 0 30px; }
.footer a { color: #e1e6ed; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 34px; margin-bottom: 36px; }
.footer h4 { color: var(--ivory); font-family: var(--sans); font-size: .82rem; letter-spacing: .12em; text-transform: uppercase; margin: 0 0 14px; }
.footer ul { list-style: none; padding: 0; margin: 0; }
.footer li { margin-bottom: 9px; font-size: .94rem; }
.footer .f-brand { display: flex; align-items: center; gap: 11px; margin-bottom: 14px; }
.footer .f-brand img { width: 40px; height: 40px; border-radius: 10px; }
.footer .f-brand b { font-family: var(--serif); font-size: 1.2rem; color: var(--ivory); }
.footer .f-tag { font-size: .92rem; max-width: 30ch; color: #aeb8c7; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); padding-top: 20px; font-size: .84rem; color: #96a3b6; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; }
@media (max-width: 820px) { .footer-grid { grid-template-columns: 1fr 1fr; } }

/* ----- Guide article layout ---------------------------------------------- */
.breadcrumb { font-size: .85rem; color: var(--muted); padding: 22px 0 0; }
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--rust-dark); }

.article { padding: 24px 0 70px; }
.article-head { max-width: 760px; margin: 0 auto 34px; text-align: center; }
.article-head .eyebrow { text-align: center; }
.article-head p.lede { font-size: 1.18rem; color: var(--brown); margin-top: 10px; }

.article-body { max-width: 760px; margin: 0 auto; font-size: 1.06rem; color: var(--brown); }
.article-body h2 { margin-top: 44px; }
.article-body h3 { margin-top: 30px; color: var(--espresso); }
.article-body ul, .article-body ol { padding-left: 1.3em; margin: 0 0 1.2em; }
.article-body li { margin-bottom: 9px; }
.article-body strong { color: var(--espresso); }

.callout {
  background: var(--ivory); border: 1px solid var(--line); border-left: 4px solid var(--rust);
  border-radius: 14px; padding: 26px 28px; margin: 34px 0; box-shadow: var(--shadow-sm);
}
.callout h3 { margin-top: 0; }
.callout ol { margin-bottom: 0; }

.app-inline { display: grid; grid-template-columns: 200px 1fr; gap: 28px; align-items: center; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 30px; margin: 40px 0; box-shadow: var(--shadow-md); }
.app-inline img { border-radius: 22px; box-shadow: var(--shadow-md); }
.app-inline h3 { margin-top: 0; }
.app-inline p { color: var(--muted); }
@media (max-width: 640px) { .app-inline { grid-template-columns: 1fr; text-align: center; } .app-inline img { max-width: 220px; margin: 0 auto; } }

.related { border-top: 1px solid var(--line); margin-top: 50px; padding-top: 34px; }
.related h2 { text-align: center; font-size: 1.6rem; }

/* Motion system */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 100;
  width: 100%;
  height: 3px;
  pointer-events: none;
  background: linear-gradient(90deg, var(--gold), var(--rust));
  transform: scaleX(var(--scroll-progress, 0));
  transform-origin: left center;
}

.nav {
  transition: background-color .35s ease, box-shadow .35s ease, border-color .35s ease;
}

.nav.is-scrolled {
  background: rgba(248,246,241,.97);
  border-color: rgba(20,33,61,.12);
  box-shadow: 0 12px 34px rgba(20,33,61,.08);
}

.motion-ready .motion-reveal {
  opacity: 0;
  filter: blur(5px);
  transition:
    opacity .75s cubic-bezier(.2,.75,.25,1) var(--reveal-delay, 0ms),
    filter .75s cubic-bezier(.2,.75,.25,1) var(--reveal-delay, 0ms),
    transform .9s cubic-bezier(.2,.75,.25,1) var(--reveal-delay, 0ms);
}

.motion-ready .motion-reveal:not(.tilt-surface) {
  transform: translate3d(0, 30px, 0) scale(.985);
}

.motion-ready .motion-reveal.tilt-surface {
  --reveal-y: 30px;
}

.motion-ready .motion-reveal.is-visible {
  opacity: 1;
  filter: blur(0);
}

.motion-ready .motion-reveal.is-visible:not(.tilt-surface) {
  transform: translate3d(0, 0, 0) scale(1);
}

.motion-ready .motion-reveal.is-visible.tilt-surface {
  --reveal-y: 0px;
}

.motion-ready .motion-reveal.is-visible.is-settled.tilt-surface {
  transition: transform .24s cubic-bezier(.2,.75,.25,1), box-shadow .32s ease;
}

.tilt-surface {
  --tilt-x: 0deg;
  --tilt-y: 0deg;
  --tilt-lift: 0px;
  transform: perspective(1100px) translate3d(0, calc(var(--tilt-lift) + var(--reveal-y, 0px)), 0) rotateX(var(--tilt-x)) rotateY(var(--tilt-y));
  transform-style: preserve-3d;
  will-change: transform;
  transition: transform .32s cubic-bezier(.2,.75,.25,1), box-shadow .32s ease;
}

.tilt-surface:hover {
  --tilt-lift: -5px;
}

.tilt-surface > * {
  transform-style: preserve-3d;
}

.tilt-surface h2,
.tilt-surface h3,
.tilt-surface .step-n,
.tilt-surface .ic {
  transform: translateZ(16px);
}

.phone-stack img {
  transform: translate3d(0, var(--parallax-y, 0px), 22px) rotate(2deg);
  transition: transform .25s linear;
}

.shot img,
.app-inline img {
  transform: translate3d(0, var(--parallax-y, 0px), 0);
  transition: transform .25s linear, box-shadow .2s ease;
}

.shot:hover img {
  transform: translate3d(0, calc(var(--parallax-y, 0px) - 6px), 0);
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
  .motion-ready .motion-reveal { opacity: 1; filter: none; transform: none; }
  .phone-stack img, .shot img, .shot:hover img, .app-inline img { transform: none; }
}
