/* ==========================================================================
   Mary — website styles
   Adapted from Kevser. Palette and arch motif are derived from the app icon
   (assets/mary-icon.png): deep navy, warm cream, muted gold.
   No frameworks, no external fonts, no network requests.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Tokens
   -------------------------------------------------------------------------- */
:root {
  --brand-950: #0C1424;
  --brand-900: #111C33;
  --brand-800: #172542;
  --brand-700: #213358;

  --cream-50:  #FFFBF3;
  --cream-100: #FDF3E2;
  --cream-200: #FBE6C7;
  --sand-400:  #E8C89A;
  --sand-500:  #D2AE79;
  --gold-400:  #D6AE6E;
  --gold-500:  #C08F3E;
  --gold-ink:  #8A5F1E;

  --ink:       #151F33;
  --ink-muted: #3F4A5E;

  --font-display: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, "Times New Roman", serif;
  --font-ui: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --shell: 1320px;
  --gutter: clamp(1.25rem, 4vw, 3.5rem);
  --band-pad: clamp(3.5rem, 7vw, 6.5rem);
  --radius: 4px;
}

/* --------------------------------------------------------------------------
   2. Base
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--cream-100);
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 1rem;
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img, svg { max-width: 100%; }
img { height: auto; }

a { color: inherit; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.015em;
  margin: 0;
  text-wrap: balance;
}

p { margin: 0 0 1.1em; }
p:last-child { margin-bottom: 0; }

ul, ol { margin: 0 0 1.1em; padding-left: 1.15em; }

/* --------------------------------------------------------------------------
   3. Accessibility helpers
   -------------------------------------------------------------------------- */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.skip-link {
  position: absolute;
  left: 1rem;
  top: -100px;
  z-index: 100;
  background: var(--brand-800);
  color: var(--cream-100);
  padding: 0.85rem 1.25rem;
  font: 600 0.9rem/1 var(--font-ui);
  border-radius: var(--radius);
  transition: top 0.15s ease;
}
.skip-link:focus { top: 1rem; }

:focus-visible {
  outline: 3px solid var(--gold-500);
  outline-offset: 3px;
  border-radius: 2px;
}
/* --------------------------------------------------------------------------
   4. Layout primitives
   -------------------------------------------------------------------------- */
.shell {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.band {
  position: relative;
  padding-block: var(--band-pad);
}
.band--cream { background: var(--cream-100); }
.band--sand  { background: var(--cream-200); }

/* Manuscript margin rail: a hairline and a numeral beside each section. */
.section-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.1rem;
  margin-bottom: clamp(2rem, 4vw, 3.25rem);
}
.eyebrow {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0;
  font: 600 0.72rem/1.4 var(--font-ui);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold-ink);
}
.eyebrow::after {
  content: "";
  flex: 1 1 auto;
  height: 1px;
  background: currentColor;
  opacity: 0.45;
  max-width: 7rem;
}
h2.section-title { font-size: clamp(1.85rem, 3.4vw, 2.75rem); }
h3 { font-size: clamp(1.1rem, 1.6vw, 1.3rem); letter-spacing: -0.01em; }

/* --------------------------------------------------------------------------
   5. Site header
   -------------------------------------------------------------------------- */
.site-header {
  position: relative;
  z-index: 5;
  background: var(--brand-900);
  color: var(--cream-200);
  border-bottom: 1px solid rgba(214, 174, 110, 0.22);
}
.site-header__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
  padding-block: 0.85rem;
}
.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  color: var(--cream-50);
  min-height: 44px;
}
.wordmark img {
  width: 38px; height: 38px;
  border-radius: 9px;
  border: 1px solid rgba(214, 174, 110, 0.45);
  display: block;
}
.wordmark__text {
  font-family: var(--font-display);
  font-size: 1.2rem;
  letter-spacing: 0.01em;
}
.wordmark__text span {
  display: block;
  font-family: var(--font-ui);
  font-size: 0.63rem;
  letter-spacing: 0.19em;
  text-transform: uppercase;
  color: var(--gold-400);
  margin-top: 2px;
}
.site-header__actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.65rem 1.5rem;
}
.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem 1.35rem;
  list-style: none;
  margin: 0; padding: 0;
}
.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding-inline: 2px;
  text-decoration: none;
  font-size: 0.9rem;
  color: rgba(251, 230, 199, 0.88);
  border-bottom: 1px solid transparent;
}
.site-nav a:hover { color: var(--cream-50); border-bottom-color: var(--gold-400); }
.site-nav a[aria-current="page"] { color: var(--gold-400); border-bottom-color: var(--gold-400); }
/* --------------------------------------------------------------------------
   6. Buttons, badges, links
   -------------------------------------------------------------------------- */
.cta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.5rem;
}
.availability {
  margin: 0;
  font-size: 0.85rem;
  letter-spacing: 0.02em;
  color: rgba(251, 230, 199, 0.72);
}
.availability--spaced { margin-top: 1rem; }

/* --------------------------------------------------------------------------
   7. Hero
   -------------------------------------------------------------------------- */
.hero {
  position: relative;
  background: var(--brand-900);
  color: var(--cream-200);
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='128' height='150' viewBox='0 0 128 150'%3E%3Cpath d='M14 152 V72 C14 32 36 8 64 8 C92 8 114 32 114 72 V152' fill='none' stroke='%23D6AE6E' stroke-width='1'/%3E%3C/svg%3E");
  background-size: 128px 150px;
  opacity: 0.08;
  pointer-events: none;
}
.hero::after {
  content: "";
  position: absolute;
  right: -18%;
  top: -30%;
  width: 60%;
  height: 130%;
  background: radial-gradient(closest-side, rgba(43, 63, 102, 0.9), rgba(17, 28, 51, 0));
  pointer-events: none;
}
.hero__inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
  padding-block: clamp(3rem, 6vw, 5.5rem) clamp(2.5rem, 4vw, 4rem);
}
.hero__inner--concise { min-height: 680px; }
.hero .eyebrow { margin-bottom: 1rem; }
.hero h1 {
  font-size: clamp(2.5rem, 5.4vw, 4.15rem);
  line-height: 1.03;
  letter-spacing: -0.025em;
  color: var(--cream-50);
  margin-bottom: 1.4rem;
  max-width: 15ch;
}
.hero h1 em {
  font-style: italic;
  color: var(--gold-400);
}
.hero__lede {
  font-size: clamp(1.05rem, 1.45vw, 1.22rem);
  line-height: 1.62;
  color: rgba(251, 230, 199, 0.9);
  max-width: 48ch;
  margin-bottom: 2rem;
}
/* The arch "niche" the app icon sits inside — the icon's own composition. */
.hero__media {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
}
.niche {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  width: min(100%, 500px);
  aspect-ratio: 360 / 470;
}
.niche__arch {
  position: absolute;
  inset: auto 0 0 0;
  width: 100%;
  margin-inline: auto;
  height: auto;
}
.hero__icon {
  position: relative;
  z-index: 1;
  display: block;
  width: 58%;
  max-width: 280px;
  height: auto;
  margin-bottom: 26%;
  border-radius: 22%;
  border: 1px solid rgba(214, 174, 110, 0.45);
  filter: drop-shadow(0 24px 25px rgba(12, 20, 36, 0.34));
}
.coming-soon {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  min-height: 48px;
  padding: 0.7rem 1.4rem;
  border-radius: 999px;
  border: 1px solid rgba(214, 174, 110, 0.6);
  font: 600 0.95rem/1 var(--font-ui);
  letter-spacing: 0.04em;
  color: var(--cream-50);
}
.coming-soon::before {
  content: "";
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--gold-400);
}

/* --------------------------------------------------------------------------
   10. Card grids
   -------------------------------------------------------------------------- */
.cards {
  display: grid;
  gap: clamp(1rem, 2vw, 1.5rem);
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}
.section-head--centered {
  max-width: 720px;
  margin: 0 auto 2.5rem;
  text-align: center;
}
.concise-cards { margin-top: 2.5rem; }
/* Four cards read better as a square than as a row of three plus an orphan. */
@media (min-width: 780px) {
  .cards--pair { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.card {
  position: relative;
  padding: 1.6rem 1.5rem 1.75rem;
  background: var(--cream-50);
  border: 1px solid var(--sand-400);
  border-radius: var(--radius);
}
.card h3 { margin-bottom: 0.6rem; }
.card p { font-size: 0.94rem; color: var(--ink-muted); }
.card__arch {
  display: block;
  width: 26px; height: 32px;
  margin-bottom: 1rem;
  color: var(--gold-500);
}

/* --------------------------------------------------------------------------
   14. Footer
   -------------------------------------------------------------------------- */
.site-footer {
  background: var(--brand-950);
  color: rgba(251, 230, 199, 0.78);
  padding-block: clamp(2.5rem, 5vw, 4rem) 2rem;
  font-size: 0.88rem;
}
.site-footer__top {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) repeat(2, minmax(0, 1fr));
  gap: 2rem clamp(1.5rem, 4vw, 3rem);
  padding-bottom: 2rem;
  border-bottom: 1px solid rgba(214, 174, 110, 0.22);
}
.site-footer h2 {
  font-family: var(--font-ui);
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold-400);
  margin-bottom: 0.9rem;
}
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 0.35rem; }
.site-footer a {
  color: rgba(251, 230, 199, 0.85);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  border-bottom: 1px solid transparent;
}
.site-footer a:hover { color: var(--cream-50); border-bottom-color: var(--gold-400); }
.site-footer__mark {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 1rem;
}
.site-footer__mark img { width: 44px; height: 44px; border-radius: 10px; }
.site-footer__mark span {
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--cream-50);
}
.site-footer__legal {
  margin-top: 1.75rem;
  display: grid;
  gap: 0.75rem;
  font-size: 0.78rem;
  color: rgba(251, 230, 199, 0.6);
}
.site-footer__legal p { margin: 0; max-width: 90ch; }
.footer-summary { max-width: 34ch; }

/* --------------------------------------------------------------------------
   15. Motion
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

/* --------------------------------------------------------------------------
   16. Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 1000px) {
  .hero__inner { grid-template-columns: minmax(0, 1fr); }
  .hero__inner .hero__media { order: 2; }
}

@media (max-width: 640px) {
  .site-header__inner { flex-direction: column; align-items: flex-start; }
  .site-header__actions {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: nowrap;
    column-gap: 0.75rem;
  }
  .site-nav ul {
    flex-wrap: nowrap;
    gap: 0 0.75rem;
  }
  .hero h1 { max-width: none; }
  .site-footer__top { grid-template-columns: minmax(0, 1fr); }
  .hero__inner--concise { min-height: 0; }
}

@media (min-width: 1001px) {
  /* Manuscript rail: section numerals sit in the left margin on desktop. */
  .section-head { grid-template-columns: minmax(0, 1fr); }
}

@media print {
  .site-header, .site-footer, .skip-link { display: none; }
  body { background: #fff; color: #000; }
}
