/* site.css — site-specific styles on top of design tokens */

* { box-sizing: border-box; }
body { margin: 0; }

/* ---------- Layout ---------- */
.site {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.container { max-width: 720px; margin: 0 auto; padding: 0 24px; }
.container-wide { max-width: 1080px; margin: 0 auto; padding: 0 32px; }

/* ---------- Top Nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; padding: 14px 0; }
.nav .wm { font-family: var(--font-script); font-size: 34px; color: var(--ink-900); line-height: 1; cursor: pointer; user-select: none;}
.nav-links { display: flex; gap: 24px; align-items: center; }
.nav-link {
  font-family: var(--font-sans); font-weight: 600; font-size: 14px;
  color: var(--fg-2); cursor: pointer; padding: 6px 4px;
  border-bottom: 1.5px solid transparent;
  transition: color var(--dur-2) var(--ease-soft), border-color var(--dur-2) var(--ease-soft);
}
.nav-link:hover { color: var(--fg); }
.nav-link.active { color: var(--fg); border-bottom-color: var(--accent); }
.nav-cta {
  font-family: var(--font-sans); font-weight: 700; font-size: 13px;
  background: var(--terracotta-500); color: var(--paper-50);
  border: none; border-radius: 999px; padding: 8px 16px; cursor: pointer;
  transition: all var(--dur-2) var(--ease-soft);
}
.nav-cta:hover { background: var(--terracotta-700); box-shadow: var(--shadow-warm); }

/* ---------- Section ---------- */
.section { padding: 32px 0; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 22px;}
.section-title { font-family: var(--font-serif); font-weight: 500; font-size: 28px; letter-spacing: -0.01em; color: var(--fg); margin: 0; }
.section-link { font-family: var(--font-sans); font-size: 13px; color: var(--link); font-weight: 600; cursor: pointer; }
.section-link:hover { color: var(--link-hover); }
.eyebrow {
  font-family: var(--font-sans); font-weight: 700; font-size: 11px;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent);
}
.section-lede {
  font-family: var(--font-serif); font-style: italic;
  color: var(--fg-3); font-size: 17px; margin-top: -12px; margin-bottom: 24px;
  max-width: 54ch;
}

/* ---------- Post reading view ---------- */
.post-view { padding: 40px 0 80px; }
.post-back {
  font-family: var(--font-sans); font-size: 13px; color: var(--fg-3);
  cursor: pointer; display: inline-flex; align-items: center; gap: 6px;
  margin-bottom: 24px;
}
.post-back:hover { color: var(--fg); }
.post-header { margin-bottom: 36px; }
.post-header h1 {
  font-family: var(--font-serif); font-weight: 500; font-size: 44px;
  line-height: 1.1; letter-spacing: -0.02em; color: var(--fg); margin: 8px 0 12px;
  max-width: 24ch;
}
.post-header .lede {
  font-family: var(--font-serif); font-style: italic; font-size: 22px;
  color: var(--fg-2); line-height: 1.4; margin: 0 0 16px; max-width: 56ch;
}
.post-header .meta { font-family: var(--font-sans); font-size: 13px; color: var(--fg-3); display: flex; gap: 12px; align-items: center;}
.post-header .meta .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--fg-4); }
.post-ornament { display: block; width: 56px; height: 1px; background: var(--accent); margin: 36px auto;}
.prose { max-width: 64ch; }
.prose p { font-family: var(--font-serif); font-size: 19px; line-height: 1.7; color: var(--fg-2); margin: 0 0 18px; text-wrap: pretty;}
.prose h2 { font-family: var(--font-serif); font-weight: 500; font-size: 28px; letter-spacing: -0.01em; color: var(--fg); margin: 36px 0 14px;}
.prose a { color: var(--link); text-underline-offset: 3px; text-decoration-thickness: 1px;}
.prose a:hover { color: var(--link-hover); text-decoration-thickness: 2px;}
.prose blockquote {
  margin: 24px 0; padding-left: 18px; border-left: 2px solid var(--accent);
  font-style: italic; color: var(--fg-2); font-size: 20px; line-height: 1.55;
}
.prose code {
  font-family: var(--font-mono); font-size: 0.9em;
  background: var(--bg-sunk); padding: 1px 6px; border-radius: 4px; color: var(--ink-700);
}
.prose pre {
  background: var(--bg-sunk); border: 1px solid var(--line);
  border-radius: var(--r-3); padding: 18px 20px;
  overflow: auto; font-size: 13px; line-height: 1.6;
  margin: 24px 0;
}
.prose pre code { background: none; padding: 0; }
.prose figure { margin: 32px 0; }
.prose figure img { width: 100%; border-radius: var(--r-4); display: block; box-shadow: var(--shadow-2);}
.prose figcaption {
  font-family: var(--font-sans); font-style: italic; font-size: 13px;
  color: var(--fg-3); margin-top: 10px; text-align: center;
}

.callout {
  display: flex; gap: 14px; padding: 16px 18px; border-radius: 14px;
  align-items: flex-start; margin: 22px 0;
  font-family: var(--font-serif); font-size: 17px; line-height: 1.55;
}
.callout .ic { flex: none; width: 26px; height: 26px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-sans); font-weight: 700; font-size: 14px;}
.callout.thought { background: var(--wisteria-50); color: var(--wisteria-700);}
.callout.thought .ic { background: var(--wisteria-500); color: var(--paper-50);}
.callout.note { background: var(--moss-50); color: var(--moss-800);}
.callout.note .ic { background: var(--moss-600); color: var(--paper-50);}

.signature {
  font-family: var(--font-script); font-size: 44px;
  color: var(--ink-900); line-height: 1; margin: 36px 0 0;
}
.signature-meta { font-family: var(--font-sans); font-size: 12px; color: var(--fg-3); margin-top: 4px;}

/* ---------- Projects grid ---------- */
.projects { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.project {
  background: var(--paper-100); border-radius: var(--r-4); overflow: hidden;
  box-shadow: var(--shadow-1); cursor: pointer;
  transition: transform var(--dur-3) var(--ease-soft), box-shadow var(--dur-3) var(--ease-soft);
  display: flex; flex-direction: column;
}
.project:hover { transform: translateY(-2px); box-shadow: var(--shadow-2);}
.project-img { aspect-ratio: 16 / 10; background-size: cover; background-position: center; }
.project-body { padding: 20px 22px 22px;}
.project-status { font-family: var(--font-sans); font-size: 11px; font-weight: 700;
  letter-spacing: 0.04em; text-transform: uppercase; padding: 3px 10px;
  border-radius: 999px; display: inline-block;
  background: var(--moss-50); color: var(--moss-800);
}
.project-status.shipped { background: var(--lagoon-100); color: var(--lagoon-800);}
.project-status.archived { background: var(--paper-200); color: var(--fg-3);}
.project h3 {
  font-family: var(--font-serif); font-weight: 500; font-size: 22px;
  letter-spacing: -0.01em; color: var(--fg); margin: 10px 0 6px;
}
.project p {
  font-family: var(--font-serif); font-style: italic; font-size: 15px;
  color: var(--fg-3); margin: 0 0 12px; line-height: 1.5;
}
.project-meta { font-family: var(--font-sans); font-size: 12px; color: var(--fg-3); display: flex; gap: 10px; align-items: center;}
.project-meta .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--fg-4);}

/* ---------- Downloads grid ---------- */
.downloads { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.download {
  position: relative;
  background: var(--paper-100); border-radius: var(--r-4); overflow: hidden;
  box-shadow: var(--shadow-1);
  transition: transform var(--dur-3) var(--ease-soft), box-shadow var(--dur-3) var(--ease-soft);
  display: flex; flex-direction: column;
}
.download:hover { transform: translateY(-2px); box-shadow: var(--shadow-2); }
.download-img {
  aspect-ratio: 16 / 9;
  background-size: cover; background-position: center;
  position: relative;
}
.download-price {
  position: absolute; top: 14px; right: 14px;
  font-family: var(--font-sans); font-weight: 800; font-size: 12px;
  letter-spacing: 0.06em; text-transform: uppercase;
  background: var(--paper-50); color: var(--ink-900);
  padding: 6px 12px; border-radius: 999px;
  box-shadow: var(--shadow-1);
}
.download-price.free { background: var(--moss-600); color: var(--paper-50); }
.download-body { padding: 20px 22px 22px; display: flex; flex-direction: column; flex: 1; }
.download-format {
  font-family: var(--font-sans); font-weight: 700; font-size: 11px;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--fg-3);
  display: flex; align-items: center; gap: 6px;
}
.download-format .ic {
  display: inline-flex; align-items: center; justify-content: center;
  width: 16px; height: 16px; color: var(--accent);
}
.download h3 {
  font-family: var(--font-serif); font-weight: 500; font-size: 22px;
  letter-spacing: -0.01em; color: var(--fg); margin: 10px 0 6px;
}
.download p {
  font-family: var(--font-serif); font-style: italic; font-size: 15px;
  color: var(--fg-3); margin: 0 0 14px; line-height: 1.5;
}
.download-cta {
  margin-top: auto;
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-sans); font-weight: 700; font-size: 13px;
  letter-spacing: 0.04em;
  background: var(--ink-900); color: var(--paper-50);
  border: none; border-radius: 999px; padding: 10px 18px;
  cursor: pointer; align-self: flex-start;
  transition: all var(--dur-2) var(--ease-soft);
}
.download-cta:hover { background: var(--terracotta-500); box-shadow: var(--shadow-warm); }
.download-cta.paid { background: var(--terracotta-500); }
.download-cta.paid:hover { background: var(--terracotta-700); }

.downloads-hero {
  padding: 56px 0 8px;
}
.downloads-hero h1 {
  font-family: var(--font-serif); font-weight: 500;
  font-size: 44px; line-height: 1.1; letter-spacing: -0.02em;
  color: var(--fg); margin: 8px 0 12px; max-width: 22ch;
}
.downloads-hero .lede {
  font-family: var(--font-serif); font-style: italic;
  font-size: 20px; color: var(--fg-2); line-height: 1.45;
  margin: 0 0 28px; max-width: 56ch;
}

/* ---------- Footer ---------- */
.footer {
  margin-top: auto;
  padding: 48px 0 36px;
  border-top: 1px solid var(--line);
  font-family: var(--font-sans); font-size: 13px; color: var(--fg-3);
}
.footer-inner { display: flex; justify-content: space-between; align-items: flex-start; gap: 32px; flex-wrap: wrap;}
.footer-col { display: flex; flex-direction: column; gap: 8px;}
.footer-col h4 { font-family: var(--font-sans); font-size: 11px; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--fg-3); margin: 0 0 4px; font-weight: 700;}
.footer-col a { color: var(--fg-2); text-decoration: none; cursor: pointer; transition: color var(--dur-2);}
.footer-col a:hover { color: var(--accent);}
.footer-sig { font-family: var(--font-script); font-size: 28px; color: var(--ink-900); line-height: 1;}

/* ---------- Util ---------- */
.fade-in { animation: fadein 400ms var(--ease-out); }
@keyframes fadein {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* =========================================================
   HOME — scrollable moodboard backdrop with floating cards
   ========================================================= */

.home { background: #0F1A2B; }

/* ---------- Hero (top) ---------- */
.home-hero {
  position: relative;
  min-height: 100vh;
  background-size: cover;
  background-position: center 30%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.home-hero-overlay {
  background: #FFFFFF;
  border: 2px solid #0F1A2B;
  padding: 40px 56px 32px;
  text-align: center;
  box-shadow: 8px 8px 0 #0F1A2B;
  max-width: 620px;
  transform: rotate(-1deg);
}
.home-wm {
  font-family: var(--font-script);
  font-size: clamp(72px, 12vw, 140px);
  color: var(--ink-900);
  line-height: 1;
  margin: 0 0 8px;
  letter-spacing: 0.01em;
}
.home-tagline {
  font-family: var(--font-serif); font-style: italic;
  font-size: 19px; color: var(--ink-700);
  margin: 8px auto 16px; max-width: 38ch; line-height: 1.45;
}
.home-byline {
  font-family: var(--font-sans);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--ink-500);
  display: flex; gap: 10px; justify-content: center; align-items: center; flex-wrap: wrap;
}
.home-byline .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--ink-300); }
.home-scroll-hint {
  margin-top: 20px;
  font-family: var(--font-sans); font-size: 11px;
  letter-spacing: 0.12em; text-transform: uppercase; font-weight: 700;
  color: var(--ink-500);
  display: inline-flex; align-items: center; gap: 8px;
  animation: nudge 2.2s var(--ease-soft) infinite;
}
@keyframes nudge {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(4px); }
}

/* ---------- Backdrop sections ---------- */
.home-section {
  position: relative;
  min-height: 92vh;
  background-size: cover;
  background-position: center;
  border-top: 2px solid var(--ink-900);
  overflow: hidden;
}
.home-section-mark {
  position: absolute;
  top: 28px;
  background: #FFFFFF;
  border: 2px solid var(--ink-900);
  padding: 10px 16px 12px;
  box-shadow: 4px 4px 0 var(--ink-900);
  z-index: 2;
  max-width: 260px;
  transform: rotate(-1deg);
}
.home-section-mark--left { left: 28px; }
.home-section-mark--right {
  right: 28px;
  transform: rotate(1deg);
}
.home-section-label {
  font-family: var(--font-sans); font-weight: 800; font-size: 11px;
  letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-900);
}
.home-section-sub {
  font-family: var(--font-serif); font-style: italic; font-size: 13px;
  color: var(--ink-700); margin-top: 2px; line-height: 1.35;
}

/* ---------- Floating "pinned" cards ---------- */
.pin-card {
  position: absolute;
  background: #FFFFFF;
  border: 2px solid var(--ink-900);
  padding: 18px 20px 16px;
  box-shadow: 6px 6px 0 var(--ink-900);
  cursor: pointer;
  transform: rotate(var(--rot, 0deg));
  transition:
    transform var(--dur-3) var(--ease-soft),
    box-shadow var(--dur-3) var(--ease-soft);
  z-index: 1;
}
.pin-card:hover {
  transform: rotate(0deg) translate(-2px, -2px);
  box-shadow: 10px 10px 0 var(--ink-900);
  z-index: 5;
}
.pin-eyebrow {
  font-family: var(--font-sans);
  font-weight: 800;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 8px;
}
.pin-project .pin-eyebrow { color: var(--moss-600); }
.pin-card.pin-subscribe .pin-eyebrow { color: var(--wisteria-700); }
.pin-title {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: 21px;
  line-height: 1.18;
  letter-spacing: -0.01em;
  color: var(--ink-900);
  margin: 0 0 8px;
}
.pin-lede {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 14px;
  line-height: 1.45;
  color: var(--ink-700);
  margin: 0 0 12px;
}
.pin-meta {
  font-family: var(--font-sans);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--ink-500);
  display: flex; gap: 10px; align-items: center;
  padding-top: 10px;
  border-top: 1px solid var(--ink-900);
}
.pin-dot { width: 3px; height: 3px; border-radius: 50%; background: var(--ink-300); }

.pin-tape {
  position: absolute;
  top: -10px; left: 50%;
  transform: translateX(-50%) rotate(-2deg);
  width: 64px; height: 14px;
  background: var(--terracotta-300);
  border: 1.5px solid var(--ink-900);
  opacity: 0.95;
}
.pin-project .pin-tape { background: var(--moss-200); }
.pin-subscribe .pin-tape { background: var(--wisteria-200); }

/* ---------- Subscribe section ---------- */
.home-subscribe-section {
  position: relative;
  background: var(--paper-100);
  border-top: 2px solid var(--ink-900);
  padding: 96px 24px;
  display: flex; align-items: center; justify-content: center;
}
.pin-subscribe {
  position: relative;
  width: 460px;
  max-width: calc(100% - 16px);
  --rot: -1.5deg;
  padding: 22px 24px 20px;
}
.pin-form { display: flex; gap: 8px; margin: 4px 0 0; }
.pin-form input {
  flex: 1;
  background: #FFFFFF;
  border: 1.5px solid var(--ink-900);
  border-radius: 0;
  padding: 10px 14px;
  font-family: var(--font-serif); font-size: 15px; color: var(--ink-900);
  outline: none;
}
.pin-form input:focus { box-shadow: inset 0 0 0 1px var(--ink-900); }
.pin-form button {
  font-family: var(--font-sans); font-weight: 800;
  font-size: 13px; letter-spacing: 0.06em; text-transform: uppercase;
  background: var(--ink-900); color: #FFFFFF;
  border: 1.5px solid var(--ink-900); border-radius: 0;
  padding: 10px 18px; cursor: pointer;
  transition: all var(--dur-2) var(--ease-soft);
}
.pin-form button:hover { background: var(--terracotta-500); border-color: var(--ink-900); }
.pin-form button:disabled { opacity: 0.5; cursor: default; }
.pin-success {
  font-family: var(--font-serif); font-style: italic;
  font-size: 14px; color: var(--moss-600);
  display: flex; align-items: center; gap: 8px;
  padding: 6px 0;
}

/* ---------- Responsive ---------- */
@media (max-width: 880px) {
  .home-section { min-height: 0; padding: 80px 16px 60px; display: flex; flex-direction: column; gap: 28px; }
  .pin-card { position: relative; left: auto !important; right: auto !important; top: auto !important; bottom: auto !important; width: auto !important; max-width: 460px; margin: 0 auto; }
  .projects, .downloads { grid-template-columns: 1fr; }
}
