/* Tesoro — gettesoro.app
   No web fonts, no CDN, no third-party requests of any kind.
   The serif stack resolves to New York on Apple devices, which is
   the same face the app itself uses. */

:root {
  --paper:      #f2f2f7;
  --card:       #ffffff;
  --ink:        #1f1f1f;
  --ink-2:      #55555c;
  --ink-3:      #86868b;
  --hair:       rgba(60, 60, 67, 0.16);
  --coin:       #b98a1c;
  --tile:       #12475a;
  --good:       #2e7d4f;

  --serif: ui-serif, "New York", Georgia, "Times New Roman", serif;
  --sans:  ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  --gutter: clamp(1.25rem, 5vw, 3rem);
  --panel-radius: 22px;
}

* { box-sizing: border-box; }

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

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

body {
  margin: 0;
  font-family: var(--serif);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.55;
  font-size: 17px;
  overflow-x: hidden;
}

/* ---------- the wallpaper layer, mirroring the app ---------- */

#wallpaper {
  position: fixed;
  inset: -8%;
  z-index: -2;
  background-size: cover;
  background-position: center;
  filter: blur(38px) saturate(115%);
  transform: scale(1.08);
  transition: opacity 420ms ease;
}

#wallpaper::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(242,242,247,0.80), rgba(242,242,247,0.94));
}

/* ---------- structure ---------- */

.wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.band { padding: clamp(3.5rem, 9vw, 7rem) 0; }
.band--tight { padding: clamp(2rem, 5vw, 3.5rem) 0; }

/* ---------- frosted panel, the app's card ---------- */

.panel {
  background: rgba(255, 255, 255, 0.62);
  -webkit-backdrop-filter: blur(30px) saturate(180%);
  backdrop-filter: blur(30px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: var(--panel-radius);
  box-shadow: 0 1px 2px rgba(0,0,0,0.04), 0 12px 40px rgba(0,0,0,0.07);
  padding: clamp(1.5rem, 4vw, 2.5rem);
}

/* ---------- type ---------- */

.eyebrow {
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin: 0 0 1rem;
}

h1 {
  font-size: clamp(2.4rem, 6.4vw, 4.1rem);
  line-height: 1.02;
  letter-spacing: -0.022em;
  font-weight: 600;
  margin: 0 0 1.25rem;
  max-width: 15ch;
}

h2 {
  font-size: clamp(1.75rem, 3.6vw, 2.5rem);
  line-height: 1.12;
  letter-spacing: -0.018em;
  font-weight: 600;
  margin: 0 0 1rem;
  max-width: 20ch;
}

h3 {
  font-size: 1.12rem;
  line-height: 1.3;
  font-weight: 600;
  margin: 0 0 0.4rem;
  letter-spacing: -0.008em;
}

p { margin: 0 0 1.1rem; max-width: 62ch; }
p:last-child { margin-bottom: 0; }

.lede { font-size: clamp(1.1rem, 2vw, 1.3rem); color: var(--ink-2); max-width: 46ch; }
.small { font-size: 0.9rem; color: var(--ink-2); }
.tiny { font-family: var(--sans); font-size: 0.78rem; color: var(--ink-3); line-height: 1.5; }

a { color: var(--ink); text-decoration-color: var(--hair); text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--coin); }

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

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

.masthead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 0;
  flex-wrap: wrap;
}

.brand { display: flex; align-items: center; gap: 0.65rem; text-decoration: none; }
.brand img { width: 34px; height: 34px; border-radius: 8px; display: block; }
.brand span { font-size: 1.15rem; font-weight: 600; letter-spacing: -0.01em; }

.navlinks { display: flex; gap: 1.4rem; font-family: var(--sans); font-size: 0.86rem; }
.navlinks a { text-decoration: none; color: var(--ink-2); }
.navlinks a:hover { color: var(--ink); }

/* ---------- hero ---------- */

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}

@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
  h1 { max-width: 100%; }
}

.hero-shot { width: 100%; max-width: 340px; margin: 0 auto; display: block; border-radius: 26px; }

.cta-row { display: flex; flex-wrap: wrap; gap: 0.8rem; align-items: center; margin-top: 1.8rem; }

.btn {
  display: inline-block;
  font-family: var(--sans);
  font-size: 0.92rem;
  font-weight: 600;
  padding: 0.8rem 1.5rem;
  border-radius: 999px;
  text-decoration: none;
  border: 1px solid transparent;
  transition: transform 140ms ease, background 140ms ease;
}
.btn:hover { transform: translateY(-1px); }
.btn--solid { background: var(--ink); color: #fff; }
.btn--solid:hover { background: #000; }
.btn--ghost { border-color: var(--hair); color: var(--ink); background: rgba(255,255,255,0.5); }

/* ---------- wallpaper picker, the signature ---------- */

.picker { margin-top: 2.4rem; }

.picker-label {
  font-family: var(--sans);
  font-size: 0.74rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 0.7rem;
}

.swatches { display: flex; gap: 0.55rem; flex-wrap: wrap; padding: 0; margin: 0; }

.swatch {
  width: 42px;
  height: 58px;
  border-radius: 9px;
  border: 1px solid rgba(0,0,0,0.10);
  background-size: cover;
  background-position: center;
  cursor: pointer;
  padding: 0;
  transition: transform 160ms ease, box-shadow 160ms ease;
}
.swatch:hover { transform: translateY(-2px); }
.swatch[aria-pressed="true"] {
  box-shadow: 0 0 0 2px var(--paper), 0 0 0 4px var(--ink);
}

/* ---------- feature rows ---------- */

.row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}
.row--flip .row-media { order: -1; }

@media (max-width: 860px) {
  .row { grid-template-columns: 1fr; }
  .row--flip .row-media { order: 0; }
}

.row-media img { width: 100%; max-width: 320px; display: block; margin: 0 auto; border-radius: 24px; }

/* ---------- lists ---------- */

.facts { list-style: none; padding: 0; margin: 1.4rem 0 0; }
.facts li {
  padding: 0.6rem 0;
  border-top: 1px solid var(--hair);
  font-size: 0.95rem;
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
}
.facts li span:last-child { color: var(--ink-2); font-family: var(--sans); font-size: 0.84rem; text-align: right; }

.grid3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1rem;
  margin-top: 2rem;
}
.grid3 .cell { padding: 1.4rem; border-radius: 16px; background: rgba(255,255,255,0.5); border: 1px solid var(--hair); }
.grid3 .cell p { font-size: 0.92rem; color: var(--ink-2); margin: 0; }

/* ---------- callouts ---------- */

.note {
  border-left: 3px solid var(--coin);
  padding: 0.3rem 0 0.3rem 1.1rem;
  margin: 1.6rem 0 0;
}
.note p { font-size: 0.93rem; color: var(--ink-2); }

.badge {
  display: inline-block;
  font-family: var(--sans);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--coin);
  border: 1px solid currentColor;
  border-radius: 999px;
  padding: 0.22rem 0.65rem;
  margin-bottom: 0.9rem;
}

/* ---------- steps, used only where order is real ---------- */

.steps { list-style: none; counter-reset: s; padding: 0; margin: 1.6rem 0 0; }
.steps li {
  counter-increment: s;
  position: relative;
  padding: 0 0 1.1rem 2.6rem;
  font-size: 0.96rem;
  color: var(--ink-2);
  max-width: 56ch;
}
.steps li::before {
  content: counter(s);
  position: absolute;
  left: 0; top: 0.05rem;
  width: 1.7rem; height: 1.7rem;
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
  font-family: var(--sans);
  font-size: 0.76rem;
  font-weight: 600;
  display: flex; align-items: center; justify-content: center;
}

/* ---------- footer ---------- */

footer { border-top: 1px solid var(--hair); margin-top: 3rem; padding: 2.5rem 0 3.5rem; }
.foot-links { display: flex; gap: 1.3rem; flex-wrap: wrap; font-family: var(--sans); font-size: 0.86rem; margin-bottom: 1.2rem; }
.foot-links a { color: var(--ink-2); text-decoration: none; }
.foot-links a:hover { color: var(--ink); }

/* ---------- legal pages ---------- */

.legal { max-width: 720px; }
.legal h2 { font-size: 1.35rem; margin-top: 2.6rem; max-width: 100%; }
.legal h3 { font-size: 1.02rem; margin-top: 1.6rem; }
.legal ul { padding-left: 1.1rem; }
.legal li { margin-bottom: 0.5rem; font-size: 0.97rem; }
.legal p { font-size: 0.97rem; }
.toc { font-family: var(--sans); font-size: 0.88rem; }
.toc ol { padding-left: 1.2rem; }
.toc li { margin-bottom: 0.3rem; font-size: 0.88rem; }

/* ---------- dark ---------- */

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #1c1c1e;
    --card:  #2c2c2e;
    --ink:   #e0e0e0;
    --ink-2: #a1a1a6;
    --ink-3: #7c7c81;
    --hair:  rgba(235, 235, 245, 0.16);
    --coin:  #d9a93a;
  }
  #wallpaper::after {
    background: linear-gradient(180deg, rgba(28,28,30,0.80), rgba(28,28,30,0.94));
  }
  .panel {
    background: rgba(58, 58, 60, 0.55);
    border-color: rgba(255,255,255,0.10);
    box-shadow: 0 12px 40px rgba(0,0,0,0.35);
  }
  .grid3 .cell { background: rgba(58,58,60,0.42); }
  .btn--solid { background: #e8e8ea; color: #111; }
  .btn--solid:hover { background: #fff; }
  .btn--ghost { background: rgba(58,58,60,0.42); }
  .steps li::before { background: #e8e8ea; color: #111; }
  .swatch[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--paper), 0 0 0 4px #e8e8ea; }
  :focus-visible { outline-color: #e8e8ea; }
}

/* ---------- language picker ---------- */

.headtools { display: flex; align-items: center; gap: 1.4rem; flex-wrap: wrap; }

.langs {
  display: flex;
  gap: 0.25rem;
  font-family: var(--sans);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.langs a {
  color: var(--ink-3);
  text-decoration: none;
  padding: 0.2rem 0.45rem;
  border-radius: 7px;
  border: 1px solid transparent;
}
.langs a:hover { color: var(--ink); }
.langs a[aria-current="true"] {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.55);
  border-color: var(--hair);
}
@media (prefers-color-scheme: dark) {
  .langs a[aria-current="true"] { background: rgba(255, 255, 255, 0.10); }
}

/* ---------- priority ladder (repeating price rules) ---------- */

.ladder { list-style: none; padding: 0; margin: 1.5rem 0 0; }
.ladder li {
  display: flex;
  gap: 1rem;
  align-items: baseline;
  padding: 0.85rem 1.1rem;
  border: 1px solid var(--hair);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.42);
  margin-bottom: 0.6rem;
  font-size: 0.94rem;
}
.ladder li b { font-family: var(--sans); font-size: 0.74rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-3); white-space: nowrap; min-width: 5.5rem; }
.ladder li span { color: var(--ink-2); }
@media (prefers-color-scheme: dark) {
  .ladder li { background: rgba(58, 58, 60, 0.42); }
}

/* document links sit apart from section anchors in the masthead */
.doclinks a { font-weight: 500; }
.navlinks + .doclinks { padding-left: 1.3rem; border-left: 1px solid var(--hair); }
.doclinks a { color: var(--ink); }
.navlinks a[aria-current="page"] { color: var(--ink-3); cursor: default; }
@media (max-width: 620px) {
  .navlinks + .doclinks { padding-left: 0; border-left: 0; }
}
