/* =========================================================
   piiama — editorial launch page
   Palette: mocha #2A2419  ·  oat #EFE5CD
   ========================================================= */

:root {
  --mocha: #2A2419;
  --mocha-soft: rgba(42, 36, 25, 0.78);
  --mocha-ghost: rgba(42, 36, 25, 0.55);
  --mocha-line: rgba(42, 36, 25, 0.22);
  --mocha-faint: rgba(42, 36, 25, 0.08);
  --oat: #EFE5CD;
  --oat-bright: #F8F1DD;
  --oat-deep: #E5D9BB;
  --accent: #B6743A;
  --accent-deep: #8C5326;

  --font-sans:    -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter",
                  "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display",
                  "Inter", "Segoe UI", Roboto, "Helvetica Neue", Georgia,
                  "Times New Roman", serif;
  --font-mono:    ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Monaco,
                  Consolas, "Liberation Mono", monospace;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.5;
  color: var(--mocha);
  background: var(--oat);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

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

a { color: var(--mocha); text-decoration: none; transition: color 0.18s ease; }
a:hover { color: var(--accent-deep); }

.skip-link {
  position: absolute; left: -9999px;
  background: var(--mocha); color: var(--oat); padding: 10px 14px; border-radius: 8px;
  z-index: 1000;
}
.skip-link:focus { left: 16px; top: 16px; }

::selection { background: var(--mocha); color: var(--oat); }

/* =========================================================
   Paper-grain noise overlay
   ========================================================= */
.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0.5;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='240'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.165 0 0 0 0 0.141 0 0 0 0 0.098 0 0 0 0.6 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)' opacity='0.18'/></svg>");
  background-size: 240px 240px;
}

/* =========================================================
   Layout shell
   ========================================================= */
.page {
  position: relative;
  z-index: 2;
  min-height: 100vh;
  max-width: 1340px;
  margin: 0 auto;
  padding: clamp(20px, 3vw, 36px) clamp(24px, 5vw, 64px);
  padding-bottom: 0;
  display: flex;
  flex-direction: column;
}

.rule {
  border: 0;
  border-top: 1px solid var(--mocha-line);
  margin: clamp(16px, 2.4vw, 28px) 0;
  width: 100%;
}

/* =========================================================
   Mono coming-soon indicator (top-right)
   ========================================================= */
.cornerbar {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--mocha-soft);
}
.cb-right  { display: inline-flex; align-items: center; gap: 10px; }
.cb-status { color: var(--mocha); }

.dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 rgba(182, 116, 58, 0.55);
  animation: dot-pulse 2.4s infinite;
}
@keyframes dot-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(182, 116, 58, 0.55); }
  70%  { box-shadow: 0 0 0 12px rgba(182, 116, 58, 0); }
  100% { box-shadow: 0 0 0 0 rgba(182, 116, 58, 0); }
}

.side-label {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--mocha-ghost);
}

.dl-line { display: block; }

/* =========================================================
   Wordmark strip — static, no float
   ========================================================= */
.wordmark {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2vw, 22px);
  padding: clamp(8px, 2vw, 14px) 0 clamp(8px, 2vw, 14px);
}
.wm-mark {
  width: clamp(48px, 5vw, 64px);
  height: auto;
}
.wm-text {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(36px, 5vw, 56px);
  letter-spacing: -0.025em;
  line-height: 1;
}

/* =========================================================
   Hero — asymmetric grid
   ========================================================= */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 3fr);
  gap: clamp(28px, 5vw, 64px);
  align-items: end;
  padding: clamp(28px, 6vw, 80px) 0 clamp(28px, 4vw, 64px);
}
@media (max-width: 880px) {
  .hero { grid-template-columns: 1fr; gap: 28px; align-items: start; }
}

.hero-display { min-width: 0; }

.display {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(56px, 13vw, 188px);
  line-height: 0.92;
  letter-spacing: -0.045em;
  font-weight: 600;
  color: var(--mocha);
}
.display em {
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.03em;
  color: var(--accent-deep);
}
.display strong {
  font-weight: 800;
  letter-spacing: -0.05em;
}

/* Side column */
.hero-side {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
  padding-bottom: 14px;
  max-width: 36ch;
}
.side-lede {
  margin: 0;
  font-size: clamp(15px, 1.3vw, 17px);
  line-height: 1.5;
  color: var(--mocha-soft);
  border-left: 1px solid var(--mocha-line);
  padding: 4px 0 4px 16px;
}
.side-cta {
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.04em;
  border-bottom: 1px solid var(--mocha);
  padding-bottom: 4px;
  margin-top: 6px;
  color: var(--mocha);
  transition: color 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}
.side-cta:hover {
  color: var(--accent-deep);
  border-color: var(--accent-deep);
  transform: translateX(2px);
}
.cta-arrow { font-family: var(--font-display); font-size: 16px; }

/* =========================================================
   Promise quote
   ========================================================= */
.promise {
  position: relative;
  padding: clamp(40px, 8vw, 110px) 0;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
}
.promise-label { color: var(--mocha-ghost); }

.promise blockquote {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(28px, 4.4vw, 56px);
  line-height: 1.1;
  letter-spacing: -0.02em;
  font-weight: 500;
  max-width: 22ch;
}
.promise blockquote p { margin: 0; }
.promise em {
  font-style: italic;
  font-weight: 400;
  color: var(--accent-deep);
}

/* =========================================================
   Colophon footer
   ========================================================= */
.colophon {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--mocha-soft);
  padding: clamp(16px, 3vw, 24px) 0 clamp(16px, 3vw, 24px);
}
.colophon a {
  color: var(--mocha);
  border-bottom: 1px solid var(--mocha-line);
  padding-bottom: 1px;
  transition: border-color 0.18s ease, color 0.18s ease;
}
.colophon a:hover {
  color: var(--accent-deep);
  border-color: var(--accent-deep);
}
.cf-left, .cf-right { display: inline-flex; align-items: center; gap: 8px; }
.cf-sep { opacity: 0.5; }
.cf-tag { font-size: 14px; }

/* =========================================================
   Reduced motion
   ========================================================= */
@media (prefers-reduced-motion: reduce) {
  .dot { animation: none; }
  html { scroll-behavior: auto; }
  .side-cta:hover { transform: none; }
}

/* =========================================================
   Responsive tightening
   ========================================================= */
@media (max-width: 720px) {
  .display { font-size: clamp(48px, 16vw, 100px); letter-spacing: -0.04em; }
  .wm-text { font-size: clamp(28px, 9vw, 44px); }
  .promise blockquote { font-size: clamp(28px, 8vw, 44px); }
}

/* =========================================================
   Dark mode — deep ink, cream type
   ========================================================= */
@media (prefers-color-scheme: dark) {
  :root {
    --mocha: #EFE5CD;
    --mocha-soft: rgba(239, 229, 205, 0.78);
    --mocha-ghost: rgba(239, 229, 205, 0.55);
    --mocha-line: rgba(239, 229, 205, 0.22);
    --mocha-faint: rgba(239, 229, 205, 0.07);
    --oat: #0E0B07;
    --oat-bright: #14100A;
    --oat-deep: #1A140C;
    --accent: #E2A668;
    --accent-deep: #D9954B;
  }
  .grain {
    opacity: 0.35;
    mix-blend-mode: screen;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='240'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.937 0 0 0 0 0.898 0 0 0 0 0.804 0 0 0 0.4 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)' opacity='0.18'/></svg>");
  }
  ::selection { background: var(--accent); color: var(--oat); }
}
