/* ==========================================================================
   Iwannabesaved — iwannabesaved.com
   Single stylesheet for every page. No build step, no framework.
   Light, minimalist theme.
   ========================================================================== */

:root {
  --bg: #ffffff;
  --bg-raised: #faf9f7; /* warm off-white for cards / callouts */
  --line: rgba(20, 20, 15, 0.1);
  --line-strong: rgba(20, 20, 15, 0.2);

  --text: #141410;
  --muted: #5c5b54; /* ~7:1 on --bg; legal pages are long reads */

  --amber: #d97a12; /* readable warm accent — links, emphasis (~4.6:1) */
  --amber-bright: #ff9933; /* decorative accent — hover, dots */
  --amber-soft: rgba(217, 122, 18, 0.1);

  --measure: 62ch;
  --gutter: clamp(1.25rem, 5vw, 4rem);
  --shell: 72rem;

  --radius: 12px;

  --serif: "Fraunces", ui-serif, Georgia, "Times New Roman", serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Helvetica, Arial, sans-serif;
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: clamp(1rem, 0.96rem + 0.2vw, 1.0625rem);
  line-height: 1.65;
  font-synthesis-weight: none;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

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

a {
  color: inherit;
}

::selection {
  background: var(--amber-bright);
  color: #fff;
}

:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 3px;
}

/* --- Typography ---------------------------------------------------------- */

h1,
h2,
h3 {
  font-family: var(--serif);
  font-weight: 400;
  /* Drive Fraunces' optical-size axis from the rendered size. We deliberately
     do NOT touch SOFT/WONK via font-variation-settings — those axes aren't
     requested in the Google Fonts URL, so setting them would be a silent
     no-op that reads like it does something. */
  font-optical-sizing: auto;
  letter-spacing: -0.02em;
  line-height: 1.05;
  margin: 0;
  text-wrap: balance;
}

p {
  margin: 0;
  text-wrap: pretty;
}

.eyebrow {
  font-family: var(--sans);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--amber);
  margin: 0;
}

.lede {
  color: var(--muted);
  font-size: clamp(1.0625rem, 1rem + 0.4vw, 1.25rem);
  max-width: 44ch;
}

/* --- Shell --------------------------------------------------------------- */

.shell {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: var(--text);
  color: #fff;
  padding: 0.75rem 1.25rem;
  font-weight: 500;
}

.skip-link:focus {
  left: 0;
}

/* --- Buttons ------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.9375rem 1.5rem;
  border: 1px solid var(--text);
  background: var(--text);
  color: #fff;
  font-weight: 500;
  font-size: 0.9375rem;
  letter-spacing: 0.01em;
  text-decoration: none;
  border-radius: var(--radius);
  transition: background 0.18s ease, border-color 0.18s ease,
    transform 0.18s ease, box-shadow 0.18s ease;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(20, 20, 15, 0.15);
}

.btn--ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--line-strong);
}

.btn--ghost:hover {
  background: transparent;
  border-color: var(--text);
  box-shadow: none;
}

.btn svg {
  flex: none;
}

/* --- Site header --------------------------------------------------------- */

.masthead {
  position: relative;
  z-index: 10;
  padding-block: clamp(1.25rem, 3vw, 1.75rem);
}

.masthead .shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.masthead--solid {
  border-bottom: 1px solid var(--line);
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--serif);
  font-size: 1.0625rem;
  letter-spacing: -0.01em;
  text-decoration: none;
  color: var(--text);
}

.wordmark::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--amber-bright);
  flex: none;
}

.masthead__link {
  font-size: 0.875rem;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.18s ease;
}

.masthead__link:hover {
  color: var(--amber);
}

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

.hero {
  padding-block: clamp(3rem, 9vh, 6rem) clamp(4rem, 12vh, 8rem);
}

.hero__grid {
  display: grid;
  gap: clamp(2.5rem, 6vw, 4rem);
  align-items: center;
}

.hero__inner {
  display: grid;
  gap: clamp(1.25rem, 3vw, 1.75rem);
  max-width: 40rem;
}

.hero h1 {
  font-size: clamp(2.75rem, 1.6rem + 6vw, 5.5rem);
  /* em, not ch: the measure has to scale with the headline itself, otherwise
     a body-relative unit pins this to a few hundred px at every viewport. */
  max-width: 9em;
}

@media (min-width: 56rem) {
  .hero__grid {
    grid-template-columns: minmax(0, 1fr) auto;
  }
}

/* --- Phone demo mockup --------------------------------------------------- */

.phone {
  justify-self: center;
  width: clamp(15rem, 26vw, 19rem);
  padding: 0.5rem;
  border-radius: 2.25rem;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 30px 60px -20px rgba(20, 20, 15, 0.28),
    0 8px 24px -12px rgba(20, 20, 15, 0.2);
}

.phone__screen {
  position: relative;
  aspect-ratio: 9 / 19.5;
  border-radius: 1.85rem;
  overflow: hidden;
  background: var(--bg-raised);
}

.phone__screen video,
.phone__screen img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Notch.

   Sized in % (not rem) so it tracks the frame at every clamp() width, and
   sized to sit exactly over the black pill already present in demo.mp4 —
   that recording was captured on-device, so iOS drew an *expanded* Dynamic
   Island (41.4% of frame width, 1.6%–5.8% of frame height) carrying a red
   capture indicator. Covering it does double duty: the two pills read as
   one, and the red dot is masked. Measured against the shipped encode with
   object-fit: cover accounted for; re-measure if demo.mp4 is ever replaced.
   A clip recorded over QuickTime-USB has no indicator and would allow the
   smaller, truer 34% notch this used to be. */
.phone__screen::before {
  content: "";
  position: absolute;
  top: 1.3%;
  left: 50%;
  transform: translateX(-50%);
  width: 44%;
  height: 4.6%;
  border-radius: 999px;
  background: #141410;
  z-index: 2;
}

.hero h1 em {
  font-style: italic;
  color: var(--amber-bright);
}

.hero__cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.25rem;
  margin-top: 0.75rem;
}

.hero__note {
  font-size: 0.8125rem;
  color: var(--muted);
}

/* --- Feature sections ---------------------------------------------------- */

.features {
  border-top: 1px solid var(--line);
}

.feature {
  border-bottom: 1px solid var(--line);
  padding-block: clamp(3.5rem, 10vh, 6rem);
}

.feature .shell {
  display: grid;
  gap: clamp(1rem, 4vw, 2rem);
  grid-template-columns: 1fr;
}

.feature__index {
  font-family: var(--sans);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  color: var(--muted);
  padding-top: 0.5rem;
}

.feature__index span {
  color: var(--amber);
}

.feature__body {
  display: grid;
  gap: clamp(1rem, 2.5vw, 1.5rem);
  max-width: 52rem;
}

.feature h2 {
  font-size: clamp(2rem, 1.4rem + 3vw, 3.5rem);
}

@media (min-width: 56rem) {
  .feature .shell {
    grid-template-columns: 8rem minmax(0, 1fr);
    gap: 3rem;
  }
}

/* --- Closing CTA --------------------------------------------------------- */

.closer {
  padding-block: clamp(4.5rem, 14vh, 8rem);
  text-align: center;
}

.closer .shell {
  display: grid;
  justify-items: center;
  gap: clamp(1.25rem, 3vw, 2rem);
}

.closer h2 {
  font-size: clamp(2rem, 1.4rem + 3.4vw, 4rem);
  max-width: 16ch;
}

.closer .lede {
  margin-inline: auto;
}

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

.site-footer {
  border-top: 1px solid var(--line);
  padding-block: clamp(2.5rem, 6vw, 3.5rem);
  font-size: 0.875rem;
  color: var(--muted);
}

.site-footer .shell {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 2rem;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.75rem;
}

.site-footer a {
  text-decoration: none;
  transition: color 0.18s ease;
}

.site-footer a:hover {
  color: var(--amber);
}

/* --- Document pages (privacy / terms / support / 404) -------------------- */

.doc {
  padding-block: clamp(3.5rem, 10vh, 6rem) clamp(4rem, 12vh, 7rem);
}

.doc__head {
  display: grid;
  gap: 1rem;
  padding-bottom: clamp(2rem, 5vw, 3rem);
  margin-bottom: clamp(2rem, 5vw, 3rem);
  border-bottom: 1px solid var(--line);
}

.doc__head h1 {
  font-size: clamp(2.5rem, 1.6rem + 4.4vw, 4.5rem);
}

.doc__meta {
  font-size: 0.875rem;
  color: var(--muted);
}

.doc__body {
  max-width: var(--measure);
}

.doc__body h2 {
  font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2rem);
  margin-top: clamp(2.5rem, 6vw, 3.5rem);
  margin-bottom: 0.875rem;
  scroll-margin-top: 2rem;
}

.doc__body h3 {
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: 0;
  margin-top: 2rem;
  margin-bottom: 0.5rem;
}

.doc__body p,
.doc__body ul,
.doc__body ol {
  color: var(--muted);
  margin-bottom: 1.125rem;
}

.doc__body ul,
.doc__body ol {
  padding-left: 1.25rem;
}

.doc__body li {
  margin-bottom: 0.5rem;
}

.doc__body li::marker {
  color: var(--amber);
}

.doc__body strong {
  color: var(--text);
  font-weight: 500;
}

.doc__body a {
  color: var(--amber);
  text-underline-offset: 0.2em;
  text-decoration-thickness: 1px;
}

/* Callout — used for the "have this reviewed" note and the support email. */
.note {
  border: 1px solid var(--line);
  border-left: 2px solid var(--amber);
  background: var(--bg-raised);
  border-radius: var(--radius);
  padding: 1.125rem 1.375rem;
  margin-bottom: 2rem;
}

.note p {
  margin: 0;
  font-size: 0.9375rem;
}

.note p + p {
  margin-top: 0.625rem;
}

/* Support page contact block */
.contact {
  display: grid;
  gap: 0.5rem;
  border: 1px solid var(--line);
  background: var(--bg-raised);
  border-radius: var(--radius);
  padding: clamp(1.5rem, 4vw, 2rem);
  margin-bottom: clamp(2rem, 5vw, 3rem);
}

.contact a {
  font-family: var(--serif);
  font-size: clamp(1.375rem, 1.1rem + 1.4vw, 2rem);
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.01em;
}

.contact a:hover {
  color: var(--amber);
}

/* --- 404 ----------------------------------------------------------------- */

.notfound {
  min-height: 70svh;
  display: grid;
  align-content: center;
  justify-items: start;
  gap: 1.5rem;
  padding-block: 6rem;
}

.notfound h1 {
  font-size: clamp(3rem, 2rem + 6vw, 6rem);
}

/* --- Motion / print ------------------------------------------------------ */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

@media print {
  .masthead,
  .site-footer {
    display: none;
  }
  .note {
    background: transparent;
    border: 1px solid #000;
    border-left-width: 2px;
    color: #000;
  }
  .doc__body p,
  .doc__body li {
    color: #000;
  }
}
