@import url("tokens.css");

@font-face {
  font-family: "Allo";
  src: url("fonts/AlloVariableFriendly.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: block;
}

@font-face {
  font-family: "Allo Fallback";
  src:
    local("Arial"), local("ArialMT"), local("Helvetica"),
    local("Liberation Sans"), local("Arimo");
  font-weight: 100 600;
  size-adjust: 94.3%;
  ascent-override: 102.9%;
  descent-override: 25.4%;
  line-gap-override: 0%;
}

@font-face {
  font-family: "Allo Fallback";
  src:
    local("Arial Bold"), local("Arial-BoldMT"), local("Helvetica Bold"),
    local("Liberation Sans Bold"), local("Arimo Bold");
  font-weight: 700 900;
  size-adjust: 95%;
  ascent-override: 102.1%;
  descent-override: 25.3%;
  line-gap-override: 0%;
}

:root {
  color-scheme: light;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --page: 1160px;
  --gutter: clamp(16px, 4vw, 40px);
  --font-sans: "Allo", "Allo Fallback", sans-serif;
  --font-num: "Allo", "Allo Fallback", sans-serif;
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: var(--text-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}

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

a {
  color: var(--action);
  text-underline-offset: 3px;
}

h1,
h2,
h3,
p {
  margin: 0;
  text-wrap: balance;
}

p {
  text-wrap: pretty;
}

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

.wrap {
  width: min(var(--page), 100% - var(--gutter) * 2);
  margin-inline: auto;
}

.num {
  font-family: var(--font-num);
  font-variant-numeric: tabular-nums;
}

.eyebrow {
  font: var(--text-caption);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.muted {
  color: var(--ink-muted);
}

.fine {
  font: var(--text-footnote);
  color: var(--ink-muted);
}

/* Buttons: sink onto their lip */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: var(--button-h);
  padding: 0 24px;
  border: 0;
  border-radius: var(--radius-md);
  font: var(--text-label);
  text-decoration: none;
  cursor: pointer;
  transition:
    transform 80ms var(--ease-out),
    box-shadow 80ms var(--ease-out);
}

.btn-primary {
  background: var(--action);
  color: var(--on-action);
  box-shadow: var(--shadow-lip);
}

.btn-primary:active {
  transform: translateY(4px);
  box-shadow: 0 0 0 var(--action-edge);
}

.btn-quiet {
  background: var(--surface);
  color: var(--ink);
  border: 2px solid var(--line);
  box-shadow: var(--shadow-lip-quiet);
}

.btn-quiet:active {
  transform: translateY(3px);
  box-shadow: none;
}

.btn svg {
  width: 20px;
  height: 20px;
}

/* Cards */
.card {
  background: var(--surface);
  border: 2px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lip-quiet);
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  font: var(--text-caption);
  background: var(--surface);
  color: var(--ink);
}

.chip-basil {
  background: var(--basil-soft);
  color: var(--basil-deep);
}

.chip-butter {
  background: var(--butter-soft);
  color: var(--butter-deep);
}

.chip-blue {
  background: var(--blueberry-soft);
  color: var(--blueberry-deep);
}

.chip-copper {
  background: var(--copper-soft);
  color: var(--ink);
}

/* Penny speech bubble */
.bubble {
  position: relative;
  padding: 12px 16px;
  border-radius: var(--radius-lg);
  background: var(--copper-soft);
  color: var(--ink);
  font: var(--text-callout);
}

/* iPhone 17 Pro frame: a 402 x 874 screen inside an even bezel.
   Size it with --w only; the height is derived, so no parent can stretch it. */
.phone {
  --w: 300px;
  --bezel: calc(var(--w) * 0.036);
  --sw: calc(var(--w) - var(--bezel) * 2);
  position: relative;
  flex: none;
  width: var(--w);
  height: calc(var(--sw) * 874 / 402 + var(--bezel) * 2);
  min-height: 0;
  max-height: none;
  padding: var(--bezel);
  border-radius: calc(var(--sw) * 0.14 + var(--bezel));
  background: linear-gradient(145deg, #4a3a30, #1d140f 40%, #2b201a);
  box-shadow:
    inset 0 0 0 calc(var(--w) * 0.006) #6b5546,
    0 calc(var(--w) * 0.08) calc(var(--w) * 0.16) rgba(43, 26, 16, 0.22),
    0 calc(var(--w) * 0.02) calc(var(--w) * 0.04) rgba(43, 26, 16, 0.18);
}

.phone .screen {
  position: relative;
  width: 100%;
  aspect-ratio: 402 / 874;
  overflow: hidden;
  border-radius: calc(var(--sw) * 0.14);
  background: var(--surface-sunken);
}

.phone .screen::before {
  content: "";
  position: absolute;
  z-index: 2;
  top: calc(var(--sw) * 0.027);
  left: 50%;
  width: calc(var(--sw) * 0.31);
  height: calc(var(--sw) * 0.092);
  border-radius: 999px;
  background: #000;
  transform: translateX(-50%);
}

.phone .screen img {
  width: 100%;
  height: 100%;
  aspect-ratio: 402 / 874;
  object-fit: cover;
}

/* Placeholder until the owner's screenshot arrives */
.ph {
  display: grid;
  place-content: center;
  justify-items: center;
  gap: calc(var(--w) * 0.03);
  width: 100%;
  height: 100%;
  padding: 16%;
  text-align: center;
  color: var(--ink-muted);
  background:
    repeating-linear-gradient(
      -45deg,
      transparent 0 14px,
      color-mix(in srgb, var(--line) 55%, transparent) 14px 15px
    ),
    var(--surface-sunken);
}

.ph b {
  display: grid;
  place-items: center;
  width: calc(var(--w) * 0.2);
  aspect-ratio: 1;
  border-radius: 999px;
  background: var(--surface);
  color: var(--action);
  font: 900 calc(var(--w) * 0.09) / 1 var(--font-sans);
  box-shadow: var(--shadow-lip-quiet);
}

.ph span {
  font: 700 calc(var(--w) * 0.052) / 1.25 var(--font-sans);
  color: var(--ink);
}

.ph small {
  font: 600 calc(var(--w) * 0.038) / 1.3 var(--font-sans);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* Scroll reveal: transform and opacity only */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition:
    opacity 600ms var(--ease-out),
    transform 600ms var(--ease-out);
  transition-delay: calc(var(--i, 0) * 60ms);
}

.reveal.in {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .reveal {
    transform: none;
    transition: opacity 200ms ease;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

/* Shared footer */
.site-foot {
  padding: 48px 0 96px;
  border-top: 2px solid var(--line);
}

.site-foot .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 32px;
  align-items: center;
  justify-content: space-between;
}

.site-foot nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
}

.site-foot a {
  color: var(--ink-muted);
  font: var(--text-subhead);
  text-decoration: none;
}

.site-foot a:hover {
  color: var(--ink);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font: 900 22px/1 var(--font-sans);
  letter-spacing: -0.02em;
  text-decoration: none;
}

.brand img {
  width: 36px;
  height: 36px;
  border-radius: 9px;
}
