/* Simply Orthodox — shared site styles */
:root {
  --navy: #1c2450;
  --navy-deep: #141a3c;
  --gold: #c6a15b;
  --gold-soft: #d8bd86;
  --bg: #faf8f3;
  --card: #ffffff;
  --text: #262626;
  --muted: #5f6070;
  --border: #e7e2d6;
  --maxw: 760px;

  /* Custom easing curves — stronger than the built-in CSS defaults, so motion
     reads as intentional rather than generic. (emil-design-eng) */
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

/* Header */
.site-header {
  background: var(--navy);
  border-bottom: 3px solid var(--gold);
}
.site-header .wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 18px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: 0.2px;
  transition: opacity 150ms var(--ease-out), transform 160ms var(--ease-out);
}
.brand .cross { color: var(--gold); font-size: 1.4rem; line-height: 1; }
.brand:hover { text-decoration: none; opacity: 0.85; }
.brand:active { transform: scale(0.98); }

/* Nav links — gold underline that sweeps in from the left on hover. */
.site-nav { display: flex; gap: 22px; flex-wrap: wrap; }
.site-nav a {
  position: relative;
  color: var(--gold-soft);
  font-size: 0.95rem;
  font-weight: 600;
  padding-bottom: 3px;
  transition: color 200ms var(--ease-out);
}
.site-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 2px;
  background: var(--gold);
  border-radius: 2px;
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 300ms var(--ease-out);
}
.site-nav a:hover { color: #fff; text-decoration: none; }
.site-nav a:active { transform: scale(0.97); }

/* Layout */
main {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 40px 20px 60px;
}
.legal h1, .legal h2 { color: var(--navy); }
.legal h1 { font-size: 1.9rem; margin-bottom: 4px; }
.legal .updated { color: var(--muted); font-size: 0.9rem; margin: 0 0 28px; }
.legal h2 { font-size: 1.2rem; margin-top: 34px; border-bottom: 1px solid var(--border); padding-bottom: 6px; }
.legal p, .legal li { color: var(--text); }
.legal ul { padding-left: 22px; }
.legal li { margin-bottom: 6px; }
.legal a { transition: color 160ms var(--ease-out); }
.legal a:hover { color: var(--gold); }
.callout {
  background: #fff;
  border: 1px solid var(--border);
  border-left: 4px solid var(--gold);
  border-radius: 8px;
  padding: 14px 18px;
  margin: 22px 0;
}

/* Hero (home) */
.hero { text-align: center; padding: 30px 0 10px; }
.hero .cross-lg { font-size: 3.4rem; color: var(--gold); }
.hero h1 { color: var(--navy); font-size: 2.2rem; margin: 12px 0 6px; }
.hero .tagline { color: var(--muted); font-size: 1.1rem; max-width: 520px; margin: 0 auto 26px; }

.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin: 30px 0; }
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 22px;
  transition: transform 260ms var(--ease-out), box-shadow 260ms var(--ease-out), border-color 260ms var(--ease-out);
}
.card h3 { color: var(--navy); margin: 0 0 6px; font-size: 1.05rem; transition: color 200ms var(--ease-out); }
.card p { color: var(--muted); font-size: 0.92rem; margin: 0; }

.btn {
  display: inline-block;
  background: var(--navy);
  color: var(--gold-soft);
  padding: 13px 26px;
  border-radius: 12px;
  font-weight: 700;
  border: 1px solid var(--gold);
  transition: transform 160ms var(--ease-out), background 220ms var(--ease-out),
              color 220ms var(--ease-out), box-shadow 220ms var(--ease-out);
}
.btn:hover { background: var(--navy-deep); color: #fff; text-decoration: none; }
.btn:active { transform: scale(0.97); }

/* FAQ */
.faq { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 6px 20px; margin-top: 10px; }
.faq details { border-bottom: 1px solid var(--border); padding: 14px 0; }
.faq details:last-child { border-bottom: none; }
.faq summary { cursor: pointer; font-weight: 600; color: var(--navy); list-style: none; transition: color 160ms var(--ease-out); }
.faq summary:hover { color: var(--gold); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::before {
  content: "＋";
  display: inline-block;
  color: var(--gold);
  font-weight: 700;
  margin-right: 10px;
  transition: transform 220ms var(--ease-out);
}
.faq details[open] summary::before { content: "－"; }
.faq p { margin: 10px 0 2px; color: var(--text); }

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  background: #fff;
}
.site-footer .wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 26px 20px;
  color: var(--muted);
  font-size: 0.88rem;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.site-footer a {
  position: relative;
  color: var(--navy);
  font-weight: 600;
}
.site-footer a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 100%;
  height: 1.5px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 280ms var(--ease-out);
}
.site-footer a:hover { text-decoration: none; }

/* ============================================================
   MOTION LAYER (emil-design-eng)
   Every rule below is progressive enhancement: the page is fully
   visible and functional with motion disabled, so legal content is
   never hidden behind an animation.
   ============================================================ */

/* Cross-document page transitions — asymmetric per Emil: exit fast (the user
   already decided), enter a touch slower with a slight rise. */
@view-transition { navigation: auto; }
::view-transition-old(root) { animation: 200ms var(--ease-out) both pageOut; }
::view-transition-new(root) { animation: 320ms var(--ease-out) both pageIn; }

@media (prefers-reduced-motion: no-preference) {
  /* On-load entrance. `both` fill holds the start frame before playing; the
     element's static (visible) style is the end state, so if a browser ignores
     the animation the content still shows. */
  .site-header { animation: fadeDown 520ms var(--ease-out) both; }

  /* Home hero — the cross scales in, then the headline, tagline, and CTA rise. */
  .hero .cross-lg { animation: crossIn 720ms var(--ease-out) both; animation-delay: 40ms; }
  .hero h1        { animation: fadeUp 640ms var(--ease-out) both; animation-delay: 140ms; }
  .hero .tagline  { animation: fadeUp 640ms var(--ease-out) both; animation-delay: 210ms; }
  .hero .btn      { animation: fadeUp 640ms var(--ease-out) both; animation-delay: 280ms; }

  /* Home feature cards — punchier stagger. */
  .card-grid .card { animation: fadeUp 560ms var(--ease-out) both; }
  .card-grid .card:nth-child(1) { animation-delay: 200ms; }
  .card-grid .card:nth-child(2) { animation-delay: 270ms; }
  .card-grid .card:nth-child(3) { animation-delay: 340ms; }
  .card-grid .card:nth-child(4) { animation-delay: 410ms; }
  .card-grid .card:nth-child(5) { animation-delay: 480ms; }

  main > .callout { animation: fadeUp 560ms var(--ease-out) both; animation-delay: 420ms; }

  /* Legal / support pages: fade the whole content block as ONE unit so
     long-form text never staggers or sits hidden below the fold. */
  main.legal { animation: fadeUp 560ms var(--ease-out) both; }

  /* FAQ answer eases in when its <details> opens. */
  .faq details[open] > *:not(summary) {
    animation: revealAnswer 260ms var(--ease-out) both;
  }

  /* Scroll-reveal for the FAQ list — each item fades up as it enters the
     viewport. CSS scroll-driven, so browsers without support just show the
     content normally (never hidden). */
  @supports (animation-timeline: view()) {
    .faq details {
      animation: fadeUp 1ms linear both;
      animation-timeline: view();
      animation-range: entry 5% entry 55%;
    }
  }

  /* Stronger hover — real presence — only on true pointer devices. */
  @media (hover: hover) and (pointer: fine) {
    .site-nav a:hover::after,
    .site-footer a:hover::after { transform: scaleX(1); }

    .card:hover {
      transform: translateY(-6px) scale(1.015);
      box-shadow: 0 22px 44px -18px rgba(28, 36, 80, 0.38);
      border-color: var(--gold);
    }
    .card:hover h3 { color: var(--navy-deep); }

    .btn:hover { box-shadow: 0 14px 30px -14px rgba(28, 36, 80, 0.5); }
  }
}

/* Show the underline instantly (no hover) for keyboard focus / touch, where the
   sweep can't be triggered by hover. */
.site-nav a:focus-visible::after,
.site-footer a:focus-visible::after { transform: scaleX(1); }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
}
@keyframes fadeDown {
  from { opacity: 0; transform: translateY(-12px); }
}
@keyframes crossIn {
  from { opacity: 0; transform: scale(0.6); }
}
@keyframes revealAnswer {
  from { opacity: 0; transform: translateY(8px); }
}
@keyframes pageOut {
  to { opacity: 0; }
}
@keyframes pageIn {
  from { opacity: 0; transform: translateY(10px); }
}

/* ============================================================
   APP SCREENSHOT SHOWCASE (emil-design-eng)
   A horizontally-scrollable filmstrip of pure-CSS iPhone frames.
   Screenshots load from website/screenshots/; a branded placeholder
   sits behind each image, so a missing file degrades gracefully
   instead of showing a broken image. Motion is progressive
   enhancement — the strip is fully usable, and scrollable, with
   animation disabled.
   ============================================================ */
.showcase {
  position: relative;
  margin: 46px 0 10px;
}
/* Soft gold glow so the gallery reads as a distinct "moment". */
.showcase::before {
  content: "";
  position: absolute;
  inset: -6% 0 20%;
  z-index: -1;
  background: radial-gradient(56% 82% at 50% 16%, rgba(198, 161, 91, 0.13), transparent 72%);
  pointer-events: none;
}
.showcase-eyebrow {
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--gold);
  margin: 0 0 22px;
}

/* Filmstrip — swipe/scroll sideways to browse screens. Snaps gently to each
   phone and fades at both edges so off-screen phones dissolve rather than
   getting clipped. Purpose: horizontal motion maps to "more screens", which
   makes the swipe feel intuitive. (emil-design-eng) */
.filmstrip {
  display: flex;
  gap: clamp(16px, 3.5vw, 30px);
  overflow-x: auto;
  scroll-snap-type: x proximity;
  padding: 20px 20px 42px;               /* room for the hover-lift + drop shadow (x-scroll clips y) */
  margin-inline: -20px;                  /* reach the content edges inside main */
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;                 /* Firefox */
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}
.filmstrip::-webkit-scrollbar { display: none; }

.device {
  --w: clamp(178px, 46vw, 212px);
  flex: 0 0 auto;
  width: var(--w);
  margin: 0;
  scroll-snap-align: center;
}

/* The phone body: titanium bezel wrapping the inner screen. */
.device .frame {
  position: relative;
  width: 100%;
  aspect-ratio: 37 / 80;                 /* matches the 370×800 screenshots — no crop */
  border-radius: calc(var(--w) * 0.155);
  padding: calc(var(--w) * 0.028);       /* bezel thickness */
  background: linear-gradient(155deg, #3a3f57 0%, #23283c 44%, #0f1220 100%);
  box-shadow:
    inset 0 0 0 1.5px rgba(255, 255, 255, 0.08),   /* rim light */
    0 1px 2px rgba(0, 0, 0, 0.5),                   /* hard edge */
    0 24px 46px -22px rgba(20, 26, 60, 0.6);        /* drop */
  /* Specific properties, custom ease-out, under 300ms — intentional, not generic. */
  transition: transform 280ms var(--ease-out), box-shadow 280ms var(--ease-out);
}
.device .screen {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: calc(var(--w) * 0.128);
  overflow: hidden;
  background: var(--navy-deep);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.18);
}
/* The screenshot fills the screen and sits above the placeholder. */
.device .shot {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Branded fallback — shown only if a screenshot file is missing. */
.ph { position: absolute; inset: 0; z-index: 1; display: flex; flex-direction: column; background: var(--bg); }
.ph-head {
  height: 12%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, var(--navy), var(--navy-deep));
  border-bottom: 2px solid var(--gold);
}
.ph-cross { color: var(--gold); font-size: calc(var(--w) * 0.12); line-height: 1; }

.device figcaption {
  margin-top: 14px;
  text-align: center;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--muted);
}

@media (prefers-reduced-motion: no-preference) {
  /* Staggered entrance — each phone rises into place. `both` fill holds the
     hidden start frame; the end frame is the phone's resting position, so with
     motion disabled every screen is simply visible. */
  .showcase-eyebrow { animation: fadeUp 560ms var(--ease-out) both; animation-delay: 120ms; }
  .filmstrip .device { animation: fadeUp 640ms var(--ease-out) both; }
  .filmstrip .device:nth-child(1) { animation-delay: 200ms; }
  .filmstrip .device:nth-child(2) { animation-delay: 270ms; }
  .filmstrip .device:nth-child(3) { animation-delay: 340ms; }
  .filmstrip .device:nth-child(4) { animation-delay: 410ms; }
  .filmstrip .device:nth-child(5) { animation-delay: 480ms; }

  /* Real presence on hover — lift + deeper shadow. Pointer devices only. */
  @media (hover: hover) and (pointer: fine) {
    .device:hover .frame {
      transform: translateY(-8px) scale(1.02);
      box-shadow:
        inset 0 0 0 1.5px rgba(255, 255, 255, 0.1),
        0 1px 2px rgba(0, 0, 0, 0.5),
        0 40px 68px -24px rgba(20, 26, 60, 0.66);
    }
  }
}

@media (max-width: 480px) {
  .site-header .wrap { flex-direction: column; align-items: flex-start; }
  .hero h1 { font-size: 1.8rem; }

  .device { --w: clamp(172px, 62vw, 208px); }   /* a phone-plus visible; swipe for more */
  .device figcaption { font-size: 0.78rem; }
}
