/* ============================================================
   PEBBLE — getpebbleapp.com
   site.css — page layout for the static site.

   Every color, size, radius and duration comes from the design
   system's colors_and_type.css (linked before this file), and text
   uses its .t-* roles. The only tokens defined here are page-layout
   ones the app never needed.
   ============================================================ */

:root {
  --measure: 34rem;        /* reading column — one comfortable line length */
  --mark-size: 3.5rem;     /* the pebble mark in the header */
  --kind-icon: 1.75rem;    /* hand-drawn icons: 28px, never below 20 */
  --drift: 0.75rem;        /* 12px upward settle on arrival */
  --focus-width: 2px;      /* brand-guide: soft 2px ring, offset slightly */
  --hairline: 1px;         /* brand-guide: the single 1px border */
  --press-opacity: 0.7;    /* brand-guide: calm opacity dip */
}

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

html {
  background: var(--background);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  font-family: var(--font-sans);
  font-size: var(--type-body);
  line-height: var(--lh-body);
  color: var(--text-primary);
  background: var(--background);
}

/* ---------- skip link: hidden until focused ---------- */
.skip {
  position: absolute;
  left: var(--gutter);
  top: var(--space-2);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-pill);
  background: var(--surface);
  border: var(--hairline) solid var(--border);
  color: var(--text-primary);
  text-decoration: none;
  transform: translateY(-200%);
}

.skip:focus-visible {
  transform: none;
}

/* ---------- column ---------- */
.column {
  width: 100%;
  max-width: calc(var(--measure) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ---------- header ---------- */
.site-header {
  padding-block: calc(var(--space-6) + var(--safe-top, 0px)) var(--space-6);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  min-height: var(--touch-min);
  color: var(--text-primary);
  text-decoration: none;
}

.brand img {
  display: block;
  width: var(--mark-size);
  height: auto;
}

.brand span {
  font-weight: var(--fw-medium);
  font-size: var(--type-callout);
  letter-spacing: var(--ls-tight);
}

/* ---------- main ---------- */
main { flex: 1; }

main:focus { outline: none; }

.hero {
  padding-block: var(--space-12) var(--space-16);
}

.hero h1 {
  margin: 0 0 var(--space-6);
}

.lede {
  margin: 0;
  font-weight: var(--fw-regular);
  color: var(--text-secondary);
}

section + section {
  margin-top: var(--space-16);
}

section h2 {
  margin: 0 0 var(--space-4);
}

section p {
  margin: 0;
}

section p + p {
  margin-top: var(--space-4);
}

/* ---------- the three kinds ---------- */
.kinds {
  list-style: none;
  margin: var(--space-6) 0;
  padding: 0;
  display: grid;
  gap: var(--space-5);
}

.kind {
  display: grid;
  grid-template-columns: var(--kind-icon) 1fr;
  gap: var(--space-4);
  align-items: start;
}

.kind h3 {
  margin: 0;
}

.kind p {
  color: var(--text-secondary);
}

/* The hand-drawn icons are plain SVG files; a mask lets them take the
   accent color and follow the theme, and it loads fine from disk. */
.kind-icon {
  display: block;
  width: var(--kind-icon);
  height: var(--kind-icon);
  margin-top: var(--space-1);
  background-color: var(--accent-primary);
  -webkit-mask: var(--icon) center / contain no-repeat;
  mask: var(--icon) center / contain no-repeat;
}

.kind-icon--draw  { --icon: url('../assets/icons/draw.svg'); }
.kind-icon--photo { --icon: url('../assets/icons/photo.svg'); }
.kind-icon--heart { --icon: url('../assets/icons/heart.svg'); }

/* ---------- footer ---------- */
.site-footer {
  margin-top: var(--space-16);
  padding-block: var(--space-8) calc(var(--space-8) + var(--safe-bottom, 0px));
  border-top: var(--hairline) solid var(--border);
}

.site-footer p {
  margin: 0 0 var(--space-4);
}

.site-footer nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-6);
}

.site-footer a {
  display: inline-flex;
  align-items: center;
  min-height: var(--touch-min);
  font-size: var(--type-caption);
  line-height: var(--lh-snug);
}

/* ---------- text links: body and footer share one look ---------- */
main a,
.site-footer a {
  color: var(--text-primary);
  text-decoration: underline;
  text-decoration-color: var(--border-strong);
  transition: opacity var(--dur-quick) var(--ease-settle);
}

main a:hover,
.site-footer a:hover { opacity: var(--press-opacity); }

/* ---------- focus: soft sand ring, calm not neon ---------- */
:focus-visible {
  outline: var(--focus-width) solid var(--focus-ring);
  outline-offset: var(--space-1);
}

/* ---------- arrival: a slow settle, never a bounce ---------- */
@keyframes settle {
  from { opacity: 0; transform: translateY(var(--drift)); }
  to   { opacity: 1; transform: none; }
}

.hero,
.page,
section,
.site-footer {
  animation: settle var(--dur-ambient) var(--ease-settle) both;
}

section { animation-delay: var(--dur-quick); }
.site-footer { animation-delay: var(--dur-base); }

@media (prefers-reduced-motion: reduce) {
  .hero, .page, section, .site-footer { animation: none; }
}

/* ---------- inner pages: privacy, terms, support ---------- */
.page {
  padding-block: var(--space-12);
}

.page h1 {
  margin: 0 0 var(--space-4);
}

/* The draft notice: placeholder copy must read as a draft, not as
   reviewed legal text. Warning tint from the design system, hairline
   edge, and the callout role so it sits below the headline. */
.draft {
  margin: var(--space-6) 0 0;
  padding: var(--space-4) var(--space-5);
  border-radius: var(--radius-lg);
  background: var(--warning-soft);
  border: var(--hairline) solid var(--warning);
  color: var(--text-primary);
}

.draft strong {
  font-weight: var(--fw-semi);
}

section ul {
  margin: var(--space-4) 0 0;
  padding-left: var(--space-5);
}

section li + li {
  margin-top: var(--space-2);
}

/* ---------- the /i/* invite fallback: store links ---------- */
.stores {
  list-style: none;
  margin: var(--space-6) 0 0;
  padding: 0;
  display: grid;
  gap: var(--space-3);
}

/* One calm pill per store, hairline edge, no fill — a link, not a button
   shouting. The one that does not exist yet is plain text in the
   secondary color, so the row still reads as a pair. */
.store {
  display: inline-flex;
  align-items: center;
  min-height: var(--touch-min);
  padding: var(--space-2) var(--space-5);
  border-radius: var(--radius-pill);
  border: var(--hairline) solid var(--border-strong);
  background: var(--surface);
  color: var(--text-primary);
  text-decoration: none;
}

main a.store { text-decoration: none; }

.store--soon {
  border-color: var(--border);
  color: var(--text-secondary);
  padding-inline: var(--space-4);
  font-size: var(--type-caption);
  line-height: var(--lh-snug);
}
