/* mazzola.dev home. The blog keeps /style.css. */

@font-face {
  font-family: "Inter";
  src: url("/assets/home/fonts/inter-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #ffffff;
  --bg-alt: #f5f5f7;
  --tile: #f5f5f7;
  --tile-on-alt: #ffffff;
  --text: #1d1d1f;
  --text-2: #6e6e73;
  --text-3: #86868b;
  --line: rgba(0, 0, 0, 0.1);
  --accent: #0071e3;
  --link: #0066cc;
  --nav-bg: rgba(255, 255, 255, 0.72);
  --shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(0, 0, 0, 0.06);
  --frame: #1d1d1f;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Inter", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --wrap: 1120px;
  --r: 28px;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #000000;
    --bg-alt: #0d0d0f;
    --tile: #161617;
    --tile-on-alt: #1c1c1e;
    --text: #f5f5f7;
    --text-2: #a1a1a6;
    --text-3: #86868b;
    --line: rgba(255, 255, 255, 0.14);
    --accent: #0a84ff;
    --link: #2997ff;
    --nav-bg: rgba(0, 0, 0, 0.72);
    --shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(255, 255, 255, 0.1);
    --frame: #2c2c2e;
  }
}

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

html { scroll-behavior: smooth; scroll-padding-top: 72px; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.47;
  letter-spacing: -0.011em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

img, video { display: block; max-width: 100%; height: auto; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, p, ul { margin: 0; }
ul { padding: 0; list-style: none; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }

.skip { position: absolute; left: -9999px; top: 0; background: var(--accent); color: #fff; padding: 10px 16px; border-radius: 0 0 10px 0; z-index: 100; }
.skip:focus { left: 0; }

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

/* ---------- nav ---------- */

.nav {
  position: sticky; top: 0; z-index: 50;
  background: var(--nav-bg);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s;
}
.nav.scrolled { border-bottom-color: var(--line); }
.nav .wrap { display: flex; align-items: center; justify-content: space-between; height: 52px; }
.nav-brand { color: var(--text); font-weight: 600; font-size: 17px; letter-spacing: -0.02em; white-space: nowrap; }
.nav-brand:hover { text-decoration: none; }
.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links a { color: var(--text); opacity: 0.8; font-size: 13px; letter-spacing: -0.005em; }
.nav-links a:hover { opacity: 1; text-decoration: none; }
.nav-links .nav-cta { opacity: 1; background: var(--accent); color: #fff; padding: 5px 13px; border-radius: 980px; font-weight: 500; }

/* ---------- buttons ---------- */

.btn-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: center; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font: inherit; font-size: 17px; line-height: 1.2; letter-spacing: -0.015em;
  padding: 12px 22px; border-radius: 980px; border: 1px solid transparent;
  white-space: nowrap; transition: background 0.2s, transform 0.2s, border-color 0.2s;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: scale(0.98); }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { filter: brightness(1.08); }
.btn-ghost { color: var(--link); border-color: var(--link); }
.btn-ghost:hover { background: var(--link); color: var(--bg); }
.btn svg { width: 18px; height: 18px; flex: none; }

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

.hero { padding: 88px 0 80px; text-align: center; }
.portrait {
  width: 128px; height: 128px; border-radius: 50%; object-fit: cover; margin: 0 auto 30px;
  box-shadow: 0 0 0 1px var(--line), 0 12px 30px -10px rgba(0, 0, 0, 0.35);
}
.hero h1 { font-size: clamp(48px, 9vw, 104px); line-height: 1.02; font-weight: 600; letter-spacing: -0.04em; }
.hero .label { font-size: clamp(19px, 2.4vw, 26px); color: var(--text-2); margin-top: 16px; letter-spacing: -0.015em; }
.hero .btn-row { margin-top: 36px; }

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

.section { padding: 104px 0; }
.section.alt { background: var(--bg-alt); }
.section.alt .tile:not(.dark) { background: var(--tile-on-alt); }
.section h2 { font-size: clamp(40px, 6vw, 72px); line-height: 1.05; font-weight: 600; letter-spacing: -0.035em; margin-bottom: 44px; }
.section h2.small { font-size: 14px; line-height: 1.4; font-weight: 600; color: var(--text-2); letter-spacing: -0.005em; margin-bottom: 0; padding-bottom: 14px; border-bottom: 1px solid var(--line); }

/* ---------- tiles: picture first, then name, one line, numbers ---------- */

.tiles { display: grid; gap: 24px; }
.tile { overflow: hidden; background: var(--tile); border-radius: var(--r); }

.stage { padding: 56px 56px 0; }

.cap { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 20px 56px; align-items: end; padding: 40px 56px 48px; }
.cap h3 { font-size: clamp(30px, 3.6vw, 44px); line-height: 1.08; font-weight: 600; letter-spacing: -0.03em; }
.cap h3 a { color: inherit; }
.cap h3 a::after { content: " ›"; color: var(--text-3); transition: color 0.2s; }
.cap h3 a:hover { text-decoration: none; color: var(--link); }
.cap h3 a:hover::after { color: var(--link); }
.cap p { font-size: 19px; line-height: 1.4; color: var(--text-2); margin-top: 8px; max-width: 30em; letter-spacing: -0.015em; }
.cap .flat { grid-column: 1 / -1; margin-top: 0; padding-top: 20px; border-top: 1px solid var(--line); max-width: none; font-size: 17px; }

.stats { display: flex; gap: 44px; }
.stats b { display: block; font-size: clamp(30px, 3.4vw, 42px); line-height: 1.05; font-weight: 600; letter-spacing: -0.035em; white-space: nowrap; }
.stats span { display: block; margin-top: 6px; font-size: 13px; color: var(--text-2); white-space: nowrap; }

/* browser frame */
.browser { border-radius: 14px; overflow: hidden; box-shadow: var(--shadow); background: #fff; }
.browser-bar { height: 30px; background: #e8e8ed; display: flex; align-items: center; gap: 7px; padding: 0 13px; }
.browser-bar i { width: 9px; height: 9px; border-radius: 50%; background: #c7c7cc; }
.browser img { width: 100%; }
@media (prefers-color-scheme: dark) { .browser-bar { background: #2c2c2e; } .browser-bar i { background: #48484a; } }

/* Notes: the notes page in front, the planner behind it */
.duo { display: grid; grid-template-columns: repeat(24, minmax(0, 1fr)); }
.duo .browser { grid-row: 1; }
.duo .back { grid-column: 11 / 25; align-self: start; }
.duo .front { grid-column: 1 / 16; align-self: end; margin-top: 11%; z-index: 1; }

/* phones */
.phones { display: flex; justify-content: center; align-items: center; gap: 36px; }
.phone { flex: 0 1 236px; min-width: 0; border-radius: 38px; border: 8px solid var(--frame); overflow: hidden; background: var(--frame); box-shadow: var(--shadow); }
.phone img, .phone video { width: 100%; border-radius: 30px; }
.phone.big { flex-basis: 272px; }

/* dark tile */
.tile.dark { background: #0b0d12; color: #f5f5f7; }
.tile.dark .cap p, .tile.dark .stats span { color: #a1a1a6; }
.tile.dark .cap h3 a::after { color: #6e6e73; }
.tile.dark .cap h3 a:hover, .tile.dark .cap h3 a:hover::after { color: #2997ff; }
.tile.dark .cap .flat { border-top-color: rgba(255, 255, 255, 0.14); color: #d2d2d7; }
.tile.dark .stage { padding: 28px 28px 0; }
.tile.dark .stage img { width: 100%; border-radius: 14px; }

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

.list { border-top: 1px solid var(--line); }
.list li { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr) 76px; gap: 4px 32px; align-items: baseline; padding: 22px 0; border-bottom: 1px solid var(--line); }
.list b { font-size: 21px; font-weight: 600; letter-spacing: -0.022em; }
.list span { color: var(--text-2); }
.list time, .when { font-size: 14px; color: var(--text-3); white-space: nowrap; }
.list time { text-align: right; }

.about { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; }
.rows li { padding: 20px 0; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 1fr auto; gap: 4px 20px; align-items: baseline; }
.rows b { font-size: 19px; font-weight: 600; letter-spacing: -0.02em; }
.rows p { grid-column: 1 / -1; color: var(--text-2); font-size: 16px; }

/* ---------- contact + footer ---------- */

.contact { text-align: center; padding: 120px 0; }
.contact .mail { display: inline-block; color: var(--text); font-size: clamp(30px, 6.4vw, 76px); line-height: 1.05; font-weight: 600; letter-spacing: -0.04em; }
.contact .mail:hover { color: var(--link); text-decoration: none; }
.contact .btn-row { margin-top: 36px; }

.footer { background: var(--bg-alt); border-top: 1px solid var(--line); padding: 22px 0 28px; font-size: 12px; color: var(--text-3); }
.footer .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.footer a { color: var(--text-2); }
.footer nav { display: flex; gap: 18px; flex-wrap: wrap; }

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

.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.9s cubic-bezier(0.2, 0.7, 0.2, 1), transform 0.9s cubic-bezier(0.2, 0.7, 0.2, 1); }
.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .btn { transition: none; }
}

/* ---------- responsive ---------- */

@media (max-width: 900px) {
  .section { padding: 80px 0; }
  .stage { padding: 36px 36px 0; }
  .cap { grid-template-columns: 1fr; padding: 32px 36px 40px; }
  .phones { gap: 20px; }
  .about { grid-template-columns: 1fr; gap: 48px; }
  .list li { grid-template-columns: 1fr 76px; }
  .list span { grid-column: 1 / -1; grid-row: 2; }
}

@media (max-width: 640px) {
  body { font-size: 16px; }
  .wrap { padding: 0 16px; }
  .nav-links { gap: 16px; }
  .nav-links .hide-s { display: none; }
  .hero { padding: 56px 0 56px; }
  .hero .btn-row .btn { flex: 1 1 auto; justify-content: center; }
  .section { padding: 64px 0; }
  .section h2 { margin-bottom: 28px; }
  .tiles { gap: 16px; }
  .stage, .tile.dark .stage { padding: 20px 20px 0; }
  .tile.dark .stage { padding: 12px 12px 0; }
  .cap { padding: 24px 20px 28px; gap: 18px; }
  .cap p { font-size: 17px; }
  .cap .flat { font-size: 16px; padding-top: 16px; }
  .stats { gap: 24px; flex-wrap: wrap; }
  .browser { border-radius: 9px; }
  .browser-bar { height: 18px; gap: 4px; padding: 0 8px; }
  .browser-bar i { width: 5px; height: 5px; }
  .duo { display: grid; grid-template-columns: 1fr; gap: 14px; }
  .duo .browser { grid-row: auto; grid-column: 1; margin-top: 0; }
  .duo .front { order: -1; }
  .phones { gap: 8px; }
  .phone { border-width: 4px; border-radius: 20px; }
  .phone img, .phone video { border-radius: 16px; }
  .list b { font-size: 18px; }
  .contact { padding: 80px 0; }
}

@media print {
  .nav, .skip { display: none; }
  .js .reveal { opacity: 1; transform: none; }
}
