/* Stashify — stashify.site
   Palette and type borrowed from the app: cream paper, dark maroon ink, one amber accent. */

:root {
  --cream: #FDFBF7;
  --paper: #F6F0E7;
  --ink: #2B1B19;
  --ink-2: #4E3A36;
  --muted: #7B645E;
  --rule: rgba(43, 27, 25, 0.14);
  --rule-strong: rgba(43, 27, 25, 0.3);
  --maroon: #452826;
  --amber: #C98A2A;
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --wrap: 1140px;
  --gutter: 28px;
}

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

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

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a { color: inherit; }

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

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  padding: 10px 16px;
  background: var(--ink);
  color: var(--cream);
  z-index: 50;
}
.skip:focus { left: 12px; top: 12px; }

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

/* ---------- masthead ---------- */

.masthead {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--cream);
  border-bottom: 1px solid var(--rule);
}

.masthead__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 66px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.brand__mark { width: 28px; height: 28px; border-radius: 7px; }

.brand__word {
  font-family: var(--serif);
  font-size: 1.32rem;
  font-weight: 600;
  letter-spacing: -0.015em;
}

.nav {
  display: flex;
  align-items: center;
  gap: 30px;
  font-size: 0.92rem;
}

.nav a {
  text-decoration: none;
  color: var(--ink-2);
  padding-block: 4px;
  border-bottom: 1px solid transparent;
}
.nav a:hover { border-bottom-color: var(--rule-strong); }

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

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 500;
  letter-spacing: -0.022em;
  line-height: 1.06;
  margin: 0;
  text-wrap: balance;
}

h1 { font-size: clamp(2.55rem, 5.1vw, 4.05rem); }

h2 { font-size: clamp(1.95rem, 3.3vw, 2.7rem); line-height: 1.1; }

h3 { font-size: clamp(1.4rem, 2.3vw, 1.78rem); line-height: 1.14; }

.kicker {
  margin: 0 0 18px;
  font-size: 0.735rem;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--muted);
}

.lede {
  margin: 26px 0 0;
  font-size: 1.075rem;
  line-height: 1.62;
  color: var(--ink-2);
  max-width: 47ch;
}

.lede--tight { margin-top: 20px; }

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 22px;
  margin: 34px 0 0;
}

.btn {
  display: inline-block;
  padding: 15px 25px;
  border-radius: 999px;
  background: var(--maroon);
  color: var(--cream);
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  transition: transform 120ms ease, background-color 160ms ease;
}
.btn:hover { background: #33201e; transform: translateY(-1px); }
.btn:active { transform: none; }

.btn--quiet {
  background: none;
  color: var(--ink);
  padding: 15px 2px;
  border-bottom: 1px solid var(--rule-strong);
  border-radius: 0;
  font-weight: 500;
}
.btn--quiet:hover { background: none; border-bottom-color: var(--ink); transform: none; }

.fineprint {
  margin: 22px 0 0;
  font-size: 0.83rem;
  color: var(--muted);
}

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

.hero {
  display: grid;
  grid-template-columns: 1.04fr 0.96fr;
  align-items: center;
  gap: 56px;
  padding-block: 74px 82px;
}

.hero__art {
  position: relative;
  justify-self: end;
  width: min(322px, 100%);
}

.device--hero { position: relative; width: 100%; margin-inline: auto; }

.caption {
  position: relative;
  margin: 20px 0 0;
  font-size: 0.78rem;
  line-height: 1.45;
  color: var(--muted);
  text-align: center;
  max-width: 30ch;
}

/* ---------- device frame ---------- */

.device {
  width: 100%;
  aspect-ratio: 1080 / 2400;
  padding: 6px;
  border-radius: 30px;
  background: #1e1513;
  box-shadow:
    0 26px 44px -28px rgba(43, 27, 25, 0.55),
    0 2px 5px rgba(43, 27, 25, 0.14);
}

.device img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 25px;
}

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

.section { padding-block: 92px; }

.section__head { margin-bottom: 26px; }
.section__head h2 { max-width: 22ch; }

.section--paper {
  background: var(--paper);
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  padding-block: 82px 0;
}

/* ---------- steps ---------- */

.step {
  display: grid;
  grid-template-columns: minmax(0, 54ch) minmax(210px, 248px);
  justify-content: space-between;
  gap: 62px;
  align-items: center;
  padding-block: 58px;
  border-top: 1px solid var(--rule);
}

.step--flip {
  grid-template-columns: minmax(210px, 248px) minmax(0, 54ch);
  justify-content: space-between;
}
.step--flip .step__text { order: 2; }

.step__num {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 300;
  font-size: 1.02rem;
  color: var(--muted);
  margin-bottom: 14px;
  font-variant-numeric: lining-nums;
}

.step__text p {
  margin: 18px 0 0;
  color: var(--ink-2);
}

.meta {
  font-size: 0.815rem !important;
  line-height: 1.5;
  color: var(--muted) !important;
  padding-top: 16px;
  border-top: 1px solid var(--rule);
}

.step__art { width: 100%; max-width: 248px; }

/* ---------- screens rail ---------- */

.rail {
  display: flex;
  gap: 30px;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  padding: 34px max(var(--gutter), calc((100vw - var(--wrap)) / 2 + var(--gutter))) 62px;
  scroll-padding-inline: max(var(--gutter), calc((100vw - var(--wrap)) / 2 + var(--gutter)));
  -webkit-overflow-scrolling: touch;
}

.rail__item {
  flex: 0 0 236px;
  margin: 0;
  scroll-snap-align: start;
}

.rail__item .device { border-radius: 26px; padding: 5px; }
.rail__item .device img { border-radius: 22px; }

.rail__item figcaption {
  margin-top: 16px;
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.4;
}

.rail::-webkit-scrollbar { height: 6px; }
.rail::-webkit-scrollbar-track { background: var(--rule); }
.rail::-webkit-scrollbar-thumb { background: var(--rule-strong); }

/* ---------- split list ---------- */

.section--split {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 72px;
  align-items: start;
}

.split__left { position: sticky; top: 104px; }

.list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--rule);
}

.list li {
  padding-block: 19px;
  border-bottom: 1px solid var(--rule);
  color: var(--ink-2);
  font-size: 0.985rem;
  line-height: 1.55;
}

.list strong {
  display: block;
  color: var(--ink);
  font-weight: 600;
  margin-bottom: 3px;
}

/* ---------- download ---------- */

.section--download {
  background: var(--maroon);
  color: var(--cream);
  padding-block: 86px;
}

.download {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 72px;
  align-items: start;
}

.download .kicker { color: rgba(253, 251, 247, 0.62); }
.download h2 { color: var(--cream); }
.download .lede { color: rgba(253, 251, 247, 0.8); max-width: 42ch; }

.signup { padding-top: 6px; }

.signup__label {
  display: block;
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(253, 251, 247, 0.62);
  margin-bottom: 12px;
}

.signup__row { display: flex; gap: 10px; flex-wrap: wrap; }

.signup input[type="email"] {
  flex: 1 1 230px;
  min-width: 0;
  padding: 15px 17px;
  border-radius: 10px;
  border: 0;
  background: var(--cream);
  color: var(--ink);
  font: inherit;
  font-size: 0.95rem;
}
.signup input[type="email"]::placeholder { color: #9C857E; }
.signup input[type="email"]:focus { outline: 2px solid var(--amber); outline-offset: 2px; }

.signup button {
  padding: 15px 24px;
  border: 0;
  border-radius: 10px;
  background: #DFA13A;
  color: #33201E;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
}
.signup button:hover { background: #E9AE4B; }
.signup button:disabled { cursor: default; opacity: 0.75; }

.signup__note {
  margin: 14px 0 0;
  font-size: 0.8rem;
  color: rgba(253, 251, 247, 0.62);
}

.honeypot { position: absolute; left: -9999px; }

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

.footer {
  border-top: 1px solid var(--rule);
  padding-block: 44px 56px;
}

.footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 12px 34px;
}

.footer__brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--serif);
  font-size: 1.05rem;
  font-weight: 600;
}
.footer__brand img { border-radius: 6px; }

.footer p { margin: 0; font-size: 0.82rem; color: var(--muted); }
.footer__made { margin-left: auto !important; }
.footer__legal { margin-left: auto !important; }
.footer__credit { order: 3; }
.footer__credit { flex-basis: 100%; font-size: 0.78rem !important; margin-top: 6px !important; }
.footer a { color: var(--ink-2); text-underline-offset: 2px; }

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

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
}

/* ---------- narrow ---------- */

@media (max-width: 980px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 46px;
    padding-block: 52px 62px;
  }
  .hero__art { justify-self: start; max-width: 290px; }
  .caption { text-align: left; }

  .step, .step--flip { grid-template-columns: minmax(0, 1fr); gap: 26px; }
  .step__art { justify-self: start; margin-top: 30px; max-width: 250px; }
  .step--flip .step__text { order: 0; }

  .section--split { grid-template-columns: 1fr; gap: 40px; }
  .download { grid-template-columns: 1fr; gap: 40px; }
}

@media (max-width: 640px) {
  body { font-size: 16px; }
  .masthead__inner { height: 60px; }
  .nav { gap: 18px; font-size: 0.86rem; }
  .nav a:first-child { display: none; }
  .section { padding-block: 64px; }
  .section--paper { padding-block: 60px 0; }
  .step { padding-block: 40px; }
  .step__num { font-size: 1.1rem; }
  .hero__art { max-width: 228px; }
  .step__art { max-width: 212px; }
  .actions { gap: 14px 22px; }
  .rail { gap: 18px; padding-bottom: 44px; }
  .rail__item { flex-basis: 186px; }
  .section--download { padding-block: 62px; }
}
