/* ============================================================
   Slipsee — landing site
   Direction: "Paper & Ink" — warm editorial minimalism.
   Cream receipt paper, forest-green ink, terracotta signals,
   restrained monospace accents. Matches the iOS app identity.

   index.html is a single-viewport (no-scroll) screen with a
   quiet printer-slot strip at the bottom. about.html is a normal page.
   ============================================================ */

:root {
  /* paper */
  --paper: #f4f0e4;
  --paper-warm: #efe9d9;
  --card: #fffdf6;
  /* ink */
  --ink: #1e2a1c;
  --ink-soft: #4c5548;
  --ink-faint: #7c8276;
  /* brand */
  --green: #2e5339;
  --green-deep: #22412c;
  --green-tint: #dfe8dc;
  --terracotta: #c75b2b;
  --terracotta-soft: #f4dfd2;
  --gold: #c99a2e;
  /* lines */
  --hairline: rgba(30, 42, 28, 0.14);
  --dashed: 1px dashed rgba(30, 42, 28, 0.28);

  --font-display: "Fraunces", "Iowan Old Style", Georgia, serif;
  --font-body: "Instrument Sans", "Avenir Next", "Helvetica Neue", sans-serif;
  --font-tape: "Courier Prime", "Courier New", monospace;

  --container: 1180px;
  --shadow-card: 0 1px 2px rgba(30, 42, 28, 0.06), 0 12px 32px -12px rgba(30, 42, 28, 0.18);
  --shadow-phone: 0 2px 4px rgba(30, 42, 28, 0.12), 0 32px 64px -24px rgba(30, 42, 28, 0.35);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background-color: var(--paper);
  /* subtle paper grain */
  background-image:
    radial-gradient(rgba(30, 42, 28, 0.028) 1px, transparent 1px),
    radial-gradient(rgba(255, 255, 255, 0.5) 1px, transparent 1px);
  background-size: 7px 7px, 11px 11px;
  background-position: 0 0, 3px 5px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a { color: var(--green); text-decoration-thickness: 1px; text-underline-offset: 3px; }

::selection { background: var(--green); color: var(--card); }

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

.container {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 4vw, 2.5rem);
}

/* ---------------------------------------------------------- */
/* Navigation                                                  */
/* ---------------------------------------------------------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease;
}

.nav.scrolled { border-bottom-color: var(--hairline); }

body.home .nav { position: static; background: transparent; }

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding-block: 0.9rem;
}

.wordmark {
  font-family: var(--font-display);
  font-weight: 640;
  font-size: 1.45rem;
  letter-spacing: -0.01em;
  color: var(--green);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
}

.wordmark img {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(30, 42, 28, 0.2);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 2.5vw, 2rem);
  list-style: none;
}

.nav-links a:not(.btn) {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--ink-soft);
  text-decoration: none;
  transition: color 0.2s ease;
}

.nav-links a:not(.btn):hover,
.nav-links a[aria-current="page"] { color: var(--green); }

.nav-links a[aria-current="page"] {
  text-decoration: underline;
  text-decoration-color: var(--terracotta);
  text-decoration-thickness: 2px;
  text-underline-offset: 5px;
}

@media (max-width: 640px) {
  .nav-links li.hide-mobile { display: none; }
}

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

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.65rem 1.35rem;
  border-radius: 999px;
  text-decoration: none;
  border: 1.5px solid transparent;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

.btn-primary {
  background: var(--green);
  color: var(--card);
}

.btn-primary:hover {
  background: var(--green-deep);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px -6px rgba(34, 65, 44, 0.5);
}

.btn-ghost {
  color: var(--green);
  border-color: rgba(46, 83, 57, 0.4);
  background: transparent;
}

.btn-ghost:hover { border-color: var(--green); background: rgba(46, 83, 57, 0.06); }

/* App Store badge */
.appstore-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  background: var(--ink);
  color: #fffdf6;
  border-radius: 12px;
  padding: 0.6rem 1.3rem 0.65rem 1.05rem;
  text-decoration: none;
  line-height: 1.15;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  box-shadow: 0 1px 2px rgba(30, 42, 28, 0.2);
}

.appstore-badge:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px -8px rgba(30, 42, 28, 0.45);
}

.appstore-badge svg { width: 26px; height: 26px; flex-shrink: 0; }

.appstore-badge .badge-text { display: flex; flex-direction: column; }

.appstore-badge .badge-small {
  font-size: 0.66rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  opacity: 0.85;
}

.appstore-badge .badge-big {
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.cta-note {
  font-family: var(--font-tape);
  font-size: 0.8rem;
  color: var(--ink-faint);
  margin-top: 0.75rem;
}

/* ---------------------------------------------------------- */
/* Shared bits                                                 */
/* ---------------------------------------------------------- */

.eyebrow {
  font-family: var(--font-tape);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--terracotta);
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.2rem;
}

.eyebrow::before,
.eyebrow::after {
  content: "";
  width: 2rem;
  border-top: var(--dashed);
}

.phone {
  background: var(--ink);
  border-radius: 46px;
  padding: 10px;
  box-shadow: var(--shadow-phone);
}

.phone img {
  border-radius: 37px;
  width: 100%;
  height: auto;
}

/* ---------------------------------------------------------- */
/* One-screen home                                             */
/* ---------------------------------------------------------- */

body.home {
  height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow: clip;
}

.os-main {
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: stretch;
}

.os-grid {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: clamp(2rem, 6vw, 5rem);
  align-items: center;
}

.os-copy { padding-block: clamp(0.5rem, 2vh, 2rem); }

.os-copy h1 {
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 4vw + 1.4vh, 5.6rem);
  font-weight: 560;
  line-height: 0.98;
  letter-spacing: -0.022em;
  max-width: 8.6em;
  margin-bottom: clamp(0.9rem, 2vh, 1.35rem);
  text-wrap: balance;
}

.os-copy h1 em {
  font-style: italic;
  font-weight: 500;
  color: var(--green);
}

.os-copy .lede {
  font-size: clamp(1.08rem, 0.7vw + 0.7vh, 1.35rem);
  color: var(--ink-soft);
  max-width: 21em;
  margin-bottom: clamp(1.1rem, 3vh, 2rem);
  text-wrap: pretty;
}

.os-pills {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: clamp(1rem, 2.6vh, 1.5rem);
}

.os-pills li {
  font-family: var(--font-tape);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--green-deep);
  border: 1px solid rgba(46, 83, 57, 0.18);
  background: rgba(255, 253, 246, 0.58);
  padding: 0.48rem 0.65rem;
}

.os-ctas {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
}

/* visual: phone cluster, vertically centered in the column */

.os-visual {
  position: relative;
  align-self: stretch;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.os-cluster {
  position: relative;
  width: min(38vw, 520px);
  min-height: min(68vh, 620px);
}

.os-visual .phone-a {
  position: relative;
  z-index: 2;
  width: min(23vw, 40vh, 330px);
  rotate: -2.5deg;
}

.os-visual .phone-b {
  position: absolute;
  z-index: 1;
  right: 0;
  top: 12%;
  width: min(18.5vw, 33vh, 275px);
  rotate: 3.5deg;
  opacity: 0.9;
}

/* ---------------------------------------------------------- */
/* Quiet printer slot                                          */
/* ---------------------------------------------------------- */

.tape {
  position: relative;
  z-index: 5;
  background: var(--green);
  color: #e9efe4;
  overflow: hidden;
  min-height: 0.7rem;
  padding: 0;
  border-top: 2px solid var(--green-deep);
  flex-shrink: 0;
}

.tape-track {
  height: 0.7rem;
  background:
    repeating-linear-gradient(90deg, transparent 0 18px, rgba(233, 239, 228, 0.16) 18px 19px),
    linear-gradient(90deg, rgba(201, 154, 46, 0.18), transparent 30%, rgba(201, 154, 46, 0.1));
}

/* ---------------------------------------------------------- */
/* One-screen responsiveness                                   */
/* ---------------------------------------------------------- */

@media (max-width: 880px) {
  .os-grid {
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(0, 1fr);
    gap: 0.5rem;
    align-items: start;
    height: 100%;
  }

  .os-copy { padding-top: clamp(0.25rem, 2vh, 1.5rem); }

  .os-copy h1 { font-size: clamp(1.9rem, 4vw + 1.4vh, 2.8rem); }

  .os-visual { min-height: 140px; }

  .os-cluster {
    width: 100%;
    min-height: 100%;
    align-self: stretch;
    flex: 1;
  }

  /* phone hangs from the top of the remaining space and is
     clipped by the tape/viewport below — never overlaps copy */
  .os-visual .phone-a {
    position: absolute;
    top: 0;
    left: 50%;
    translate: -50% 0;
    width: min(55vw, 240px);
    rotate: -2deg;
  }

  .os-visual .phone-b { display: none; }
}

@media (max-width: 880px) and (max-height: 720px) {
  .os-pills { display: none; }
}

@media (max-height: 780px) and (min-width: 881px) {
  .os-copy .lede { margin-bottom: 0.9rem; }
  .os-pills { margin-top: 0.9rem; }
}

/* very short viewports (e.g. phone landscape): allow scrolling */
@media (max-height: 540px) {
  body.home { height: auto; min-height: 100dvh; overflow: auto; }
  .os-visual { min-height: 380px; }
}

/* ---------------------------------------------------------- */
/* Load-in choreography (home)                                 */
/* ---------------------------------------------------------- */

@keyframes rise {
  from { opacity: 0; translate: 0 26px; }
  to   { opacity: 1; translate: 0 0; }
}

@keyframes print-out {
  from { transform: translateY(55%); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}

.os-copy .eyebrow,
.os-copy h1,
.os-copy .lede,
.os-copy .os-pills,
.os-copy .os-ctas { animation: rise 0.8s cubic-bezier(0.22, 1, 0.36, 1) both; }

.os-copy h1 { animation-delay: 70ms; }
.os-copy .lede { animation-delay: 140ms; }
.os-copy .os-ctas { animation-delay: 210ms; }
.os-copy .os-pills { animation-delay: 280ms; }

/* phones rise out of the quiet printer slot */
.os-visual .phone-a { animation: print-out 1s cubic-bezier(0.22, 1, 0.36, 1) 250ms both; }
.os-visual .phone-b { animation: print-out 1s cubic-bezier(0.22, 1, 0.36, 1) 450ms both; }

/* mobile phone-a is centered with translate — animate transform only */
@media (max-width: 880px) {
  .os-visual .phone-a { animation-name: print-out; }
}

/* ---------------------------------------------------------- */
/* About page (normal scrolling page)                          */
/* ---------------------------------------------------------- */

.section { padding-block: clamp(4rem, 9vw, 7.5rem); }

.section-head { max-width: 42em; margin-bottom: clamp(2.5rem, 5vw, 4rem); }

.section-head h2 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 560;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-block: 0.9rem 1rem;
  text-wrap: balance;
}

.section-head h2 em { font-style: italic; font-weight: 500; color: var(--green); }

.about-hero { padding-block: clamp(3.5rem, 8vw, 6rem) clamp(2rem, 5vw, 3.5rem); }

.about-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 5.4vw, 4.2rem);
  font-weight: 560;
  line-height: 1.06;
  letter-spacing: -0.022em;
  max-width: 15em;
  margin-bottom: 1.4rem;
  text-wrap: balance;
}

.about-hero h1 em { font-style: italic; font-weight: 500; color: var(--green); }

.about-hero .lede { font-size: 1.2rem; color: var(--ink-soft); max-width: 36em; }

.about-simple {
  padding-block: clamp(3rem, 8vw, 6rem);
}

.about-sheet {
  max-width: 760px;
}

.about-sheet h1 {
  font-family: var(--font-display);
  font-size: clamp(2.45rem, 5.8vw, 4.8rem);
  font-weight: 560;
  line-height: 1.04;
  letter-spacing: -0.022em;
  margin-bottom: 1.35rem;
  text-wrap: balance;
}

.about-sheet h1 em {
  font-style: italic;
  font-weight: 500;
  color: var(--green);
}

.about-sheet .lede {
  font-size: clamp(1.1rem, 1.2vw + 0.8rem, 1.35rem);
  line-height: 1.55;
  color: var(--ink-soft);
  margin-bottom: 2.2rem;
}

.about-sheet h2 {
  font-family: var(--font-display);
  font-size: clamp(1.55rem, 2.5vw, 2.2rem);
  font-weight: 570;
  letter-spacing: -0.015em;
  line-height: 1.15;
  margin-block: 2.35rem 0.9rem;
}

.about-sheet p {
  color: var(--ink-soft);
  margin-bottom: 1.15rem;
}

.about-sheet strong {
  color: var(--ink);
  font-weight: 650;
}

.about-sheet hr {
  border: 0;
  border-top: var(--dashed);
  margin-block: clamp(2rem, 5vw, 3rem);
}

.about-rules {
  list-style: none;
  margin-top: 1.2rem;
  border-block: var(--dashed);
}

.about-rules li {
  padding-block: 1rem;
  color: var(--ink-soft);
}

.about-rules li + li {
  border-top: var(--dashed);
}

.about-note {
  font-family: var(--font-tape);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--terracotta);
  margin-top: 2.35rem;
}

.prose { max-width: 42em; }

.prose p { margin-bottom: 1.4rem; color: var(--ink-soft); }

.prose p strong { color: var(--ink); font-weight: 600; }

.prose h2 {
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 3vw, 2.3rem);
  font-weight: 570;
  letter-spacing: -0.015em;
  margin-block: 2.75rem 1rem;
}

/* Principles rendered as a receipt */

.principles {
  background: var(--card);
  max-width: 34rem;
  margin-inline: auto;
  padding: clamp(2rem, 5vw, 3rem) clamp(1.5rem, 4vw, 2.5rem) clamp(2.75rem, 6vw, 3.75rem);
  font-family: var(--font-tape);
  box-shadow: var(--shadow-card);
  rotate: -0.6deg;
  -webkit-mask:
    conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) bottom / 20px 51% repeat-x,
    linear-gradient(#000 0 0) top / 100% 50% no-repeat;
          mask:
    conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) bottom / 20px 51% repeat-x,
    linear-gradient(#000 0 0) top / 100% 50% no-repeat;
}

.principles .p-head {
  text-align: center;
  font-weight: 700;
  letter-spacing: 0.16em;
  margin-bottom: 0.4rem;
}

.principles .p-sub {
  text-align: center;
  font-size: 0.8rem;
  color: var(--ink-faint);
  margin-bottom: 1.25rem;
}

.principles ol { list-style: none; }

.principles li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  padding-block: 0.85rem;
  border-top: var(--dashed);
  font-size: 0.95rem;
}

.principles li .price { font-weight: 700; color: var(--green); white-space: nowrap; }

.principles li p {
  font-family: var(--font-body);
  font-size: 0.88rem;
  color: var(--ink-faint);
  margin-top: 0.2rem;
}

.principles .p-total {
  border-top: 2px solid var(--ink);
  margin-top: 0.25rem;
  padding-top: 1rem;
  display: flex;
  justify-content: space-between;
  font-weight: 700;
  font-size: 1rem;
}

.principles .p-foot {
  text-align: center;
  margin-top: 1.5rem;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  color: var(--ink-faint);
}

/* Privacy — dark ink block */

.ink-block {
  background: var(--green-deep);
  color: #e9efe4;
  border-radius: 26px;
  padding: clamp(2.5rem, 6vw, 4.5rem);
  position: relative;
  overflow: hidden;
}

.ink-block::after {
  /* faint oversized coin, echoing the app icon's gold dot */
  content: "";
  position: absolute;
  right: -80px;
  bottom: -110px;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  border: 2px dashed rgba(201, 154, 46, 0.35);
  pointer-events: none;
}

.ink-block .eyebrow { color: var(--gold); }
.ink-block .eyebrow::before, .ink-block .eyebrow::after { border-color: rgba(233, 239, 228, 0.35); }

.ink-block h2 {
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 3.6vw, 2.8rem);
  font-weight: 560;
  letter-spacing: -0.02em;
  line-height: 1.12;
  margin-bottom: 1rem;
  max-width: 18em;
  text-wrap: balance;
}

.ink-block > p { color: rgba(233, 239, 228, 0.82); max-width: 38em; margin-bottom: 2.25rem; }

.privacy-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1.5rem 2.5rem;
  position: relative;
  z-index: 1;
}

.privacy-grid div { border-top: 1px dashed rgba(233, 239, 228, 0.35); padding-top: 1rem; }

.privacy-grid h3 {
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.privacy-grid p { font-size: 0.92rem; color: rgba(233, 239, 228, 0.72); }

/* Final CTA — a giant receipt */

.cta-final { display: flex; justify-content: center; }

.cta-receipt {
  background: var(--card);
  width: min(560px, 100%);
  padding: clamp(2.5rem, 6vw, 3.75rem) clamp(1.75rem, 5vw, 3.25rem) clamp(3.25rem, 7vw, 4.5rem);
  text-align: center;
  box-shadow: var(--shadow-card);
  -webkit-mask:
    conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) bottom / 22px 51% repeat-x,
    linear-gradient(#000 0 0) top / 100% 50% no-repeat;
          mask:
    conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) bottom / 22px 51% repeat-x,
    linear-gradient(#000 0 0) top / 100% 50% no-repeat;
}

.cta-receipt .r-head {
  font-family: var(--font-tape);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: var(--ink-faint);
  margin-bottom: 1rem;
}

.cta-receipt h2 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4.4vw, 3rem);
  font-weight: 560;
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
  text-wrap: balance;
}

.cta-receipt h2 em { font-style: italic; font-weight: 500; color: var(--green); }

.cta-receipt p { color: var(--ink-soft); margin-bottom: 2rem; max-width: 30em; margin-inline: auto; }

/* ---------------------------------------------------------- */
/* Footer (about page)                                         */
/* ---------------------------------------------------------- */

.footer { border-top: 1px solid var(--hairline); padding-block: 2.5rem 3rem; }

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.footer .wordmark { font-size: 1.2rem; }

.footer nav ul { display: flex; gap: 1.75rem; list-style: none; }

.footer nav a {
  font-size: 0.9rem;
  color: var(--ink-soft);
  text-decoration: none;
}

.footer nav a:hover { color: var(--green); }

.footer .fine {
  width: 100%;
  font-family: var(--font-tape);
  font-size: 0.78rem;
  color: var(--ink-faint);
  letter-spacing: 0.04em;
}

/* ---------------------------------------------------------- */
/* Reveal-on-scroll (about page)                               */
/* ---------------------------------------------------------- */

.reveal {
  opacity: 0;
  translate: 0 22px;
  transition: opacity 0.7s ease, translate 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal.in { opacity: 1; translate: 0 0; }

/* ---------------------------------------------------------- */
/* Reduced motion                                              */
/* ---------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .tape-track { animation: none; }
  .os-copy .eyebrow, .os-copy h1, .os-copy .lede, .os-copy .os-pills,
  .os-copy .os-ctas,
  .os-visual .phone-a, .os-visual .phone-b { animation: none; }
  .reveal { opacity: 1; translate: none; transition: none; }
  .btn, .appstore-badge { transition: none; }
}

@media (max-width: 680px) {
  .about-simple {
    padding-block: 2.35rem 4rem;
  }

  .about-sheet h1 {
    font-size: clamp(2.2rem, 12vw, 3.45rem);
  }
}
