/* Taylored — tayloredapp.com
   One stylesheet for every page. No JavaScript anywhere on the site.
   Palette and type follow the app: cream, charcoal, black, white, yellow;
   Plus Jakarta Sans only. Spacing lands on 4 / 8. */

@font-face {
  font-family: "Plus Jakarta Sans";
  src: url("/assets/fonts/PlusJakartaSans-Medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Plus Jakarta Sans";
  src: url("/assets/fonts/PlusJakartaSans-SemiBold.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Plus Jakarta Sans";
  src: url("/assets/fonts/PlusJakartaSans-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --cream: #f7f5f1;
  --charcoal: #313130;
  --black: #000;
  --white: #fff;
  --yellow: #ffd737;

  --ground: var(--cream);
  --ink: var(--charcoal);
  --ink-2: rgb(49 49 48 / 0.72);   /* secondary text, 5:1 on cream */
  --rule: rgb(49 49 48 / 0.12);
  --surface: var(--white);

  --gutter: 24px;
  --max: 1152px;
  --measure: 680px;

  --font: "Plus Jakarta Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;

  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ground: var(--charcoal);
    --ink: var(--white);
    --ink-2: rgb(255 255 255 / 0.72);
    --rule: rgb(255 255 255 / 0.14);
    --surface: #3d3c3b;
  }
}

/* ---------- Base ---------- */

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

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

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--font);
  font-weight: 500;
  font-size: 1.0625rem;           /* 17px, the iOS body size */
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

main { flex: 1; }

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

h1, h2, h3, p, ol, ul, figure, dl, dd { margin: 0; }

a {
  color: inherit;
  text-decoration-line: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
  text-decoration-color: var(--rule);
  transition: text-decoration-color 120ms ease;
}
a:hover { text-decoration-color: currentColor; }

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

::selection { background: var(--yellow); color: var(--charcoal); }

.wrap {
  width: 100%;
  max-width: calc(var(--max) + var(--gutter) * 2);
  margin-inline: auto;
  --pad: max(var(--gutter), env(safe-area-inset-left));
  padding-inline: var(--pad);
}

.visually-hidden {
  position: absolute !important;
  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: 16px; top: -64px;
  z-index: 10;
  padding: 8px 16px;
  border-radius: 999px;
  background: var(--yellow);
  color: var(--charcoal);
  font-weight: 600;
  text-decoration: none;
}
.skip-link:focus { top: 16px; }

/* ---------- Header ---------- */

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 80px;
  padding-top: env(safe-area-inset-top);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-decoration: none;
}
.brand img {
  width: 32px;
  height: 32px;
  border-radius: 8px;
}

.site-nav ul {
  display: flex;
  gap: 24px;
  padding: 0;
  list-style: none;
}
.site-nav a {
  font-size: 1rem;
  font-weight: 600;
  text-decoration-color: transparent;
}
.site-nav a:hover,
.site-nav a[aria-current="page"] { text-decoration-color: var(--yellow); }

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

.site-footer { margin-top: 96px; }
.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 32px;
  position: relative;
  padding-block: 32px max(32px, env(safe-area-inset-bottom));
  font-size: 0.9375rem;
  color: var(--ink-2);
}
.site-footer .wrap::before {        /* rule aligned to the content, not the gutter */
  content: "";
  position: absolute;
  top: 0;
  left: var(--pad);
  right: var(--pad);
  height: 1px;
  background: var(--rule);
}
.site-footer ul {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  padding: 0;
  list-style: none;
}
.site-footer a { color: var(--ink); font-weight: 600; }

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

.eyebrow {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--ink-2);
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 8px 24px;
  border-radius: 999px;
  background: var(--yellow);
  color: var(--charcoal);
  font-weight: 600;
  font-size: 1rem;
  line-height: 1.25;
  text-decoration: none;
}
a.pill:hover { background: #ffdf5f; }

/* ---------- Home: hero ---------- */

.hero .wrap {
  display: grid;
  gap: 56px;
  align-items: center;
  padding-block: 40px 16px;
}

.hero h1 {
  font-size: clamp(2.75rem, 1.6rem + 5.2vw, 5.5rem);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -0.04em;
  max-width: 11ch;
  text-wrap: balance;
}

.hero .lede {
  margin-top: 24px;
  max-width: 30rem;
  font-size: clamp(1.125rem, 1rem + 0.5vw, 1.3125rem);
  line-height: 1.55;
  color: var(--ink-2);
  text-wrap: pretty;
}

.store { margin-top: 32px; }
.store__badge img { height: 48px; width: auto; }

/* Device frame. Holds the placeholder today; swap the <img> for a raw
   6.9" screenshot (1320 × 2868) and it fits exactly. */
.device {
  justify-self: center;
  width: min(64vw, 320px);
  padding: 10px;
  border-radius: 56px;
  background: var(--black);
}
.device__screen {
  position: relative;
  overflow: hidden;
  aspect-ratio: 1320 / 2868;
  border-radius: 46px;
  background: var(--yellow);
}
.device__screen img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.device__screen--placeholder img {
  object-fit: contain;
}
.device__screen::after {             /* Dynamic Island */
  content: "";
  position: absolute;
  top: 3%;
  left: 50%;
  width: 30%;
  height: 4%;
  transform: translateX(-50%);
  border-radius: 999px;
  background: var(--black);
}

@media (min-width: 880px) {
  .hero .wrap {
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    gap: 64px;
    padding-block: 64px 32px;
  }
  .device { width: 320px; justify-self: end; }
}

/* ---------- Home: the three lines ---------- */

.moments { margin-top: 96px; }
.moments ol {
  display: grid;
  gap: 0;
  padding: 0;
  list-style: none;
  counter-reset: moment;
}
.moments li {
  counter-increment: moment;
  padding-block: 24px 32px;
  border-top: 1px solid var(--rule);
  font-size: clamp(1.75rem, 1.3rem + 1.6vw, 2.25rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.03em;
  text-wrap: balance;
}
.moments li::before {
  content: counter(moment, decimal-leading-zero);
  display: block;
  margin-bottom: 16px;
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: 0;
  color: var(--ink-2);
  font-variant-numeric: tabular-nums;
}

@media (min-width: 880px) {
  .moments ol {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 32px;
  }
}

/* ---------- Text pages (Support, Privacy, 404) ---------- */

.page .wrap { padding-top: 40px; }
.page__inner { max-width: var(--measure); }

.page h1 {
  margin-top: 8px;
  font-size: clamp(2.25rem, 1.7rem + 2.4vw, 3.5rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.035em;
  text-wrap: balance;
}

.page .lede {
  margin-top: 24px;
  font-size: clamp(1.125rem, 1rem + 0.4vw, 1.25rem);
  line-height: 1.55;
  text-wrap: pretty;
}

.page .dates {
  margin-top: 16px;
  font-size: 0.9375rem;
  color: var(--ink-2);
}
.page .dates p + p { margin-top: 0; }

/* Support */
.contact { margin-top: 32px; }
.contact .pill {
  min-height: 56px;
  font-size: 1.125rem;
  overflow-wrap: anywhere;
}

.note {
  margin-top: 48px;
  padding: 24px;
  border-radius: 24px;
  background: var(--surface);
  color: var(--ink-2);
}

/* Privacy */
.policy section {
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid var(--rule);
}
.policy h2 {
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.015em;
}
.policy p { margin-top: 16px; }
.policy h2 + p { margin-top: 12px; }
.policy address { font-style: normal; margin-top: 16px; }

@media (max-width: 479px) {
  :root { --gutter: 20px; }
  .site-nav ul { gap: 20px; }
  .moments, .site-footer { margin-top: 72px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
