/* Asanou — landing page styles.
   A quiet, print-leaning studio page: warm paper, Newsreader headline,
   Inter body. Ported from the Claude Design handoff prototype. */

:root{
  --bg: #f4f1ec;
  --ink: #1c1a16;
  --muted: #76705f;
  --rule: #d9d3c6;
  --accent: oklch(0.55 0.08 50);
  --error: #b3402a;
  --success: #5f6b3e;

  --font-display: "Newsreader", serif;
  --font-body: "Inter", system-ui, sans-serif;
  --display-weight: 400;
  --display-tracking: -0.022em;
  --display-line: 1.08;
  --display-size: clamp(46px, 6.8vw, 88px);
}

*{ box-sizing: border-box; }
html, body{ margin: 0; padding: 0; }
body{
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* ---------- Backdrop ---------- */
.backdrop{
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}
.backdrop canvas{
  width: 100%;
  height: 100%;
  display: block;
}

/* ---------- Layout shell ---------- */
.shell{
  position: relative;
  z-index: 1;
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ---------- Nav ---------- */
nav{
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 28px 40px;
  font-size: 14px;
  letter-spacing: 0.01em;
  gap: 24px;
}
nav .mark{
  display: block;
  height: 26px;
  width: auto;
  opacity: 0;
  transform: translateY(7px);
  animation: fadeUp 640ms cubic-bezier(0.22, 0.61, 0.36, 1) 120ms forwards;
}

.info{
  font-size: 13px;
  color: var(--muted);
  letter-spacing: 0.02em;
  text-align: right;
  min-height: 1em;
  opacity: 0;
  transform: translateY(7px);
  animation: fadeUp 640ms cubic-bezier(0.22, 0.61, 0.36, 1) 300ms forwards;
}
.info .time-num{
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
  margin-right: 6px;
  color: var(--ink);
}

/* ---------- Hero ---------- */
main{
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
}
.hero{
  max-width: 820px;
  text-align: left;
}
h1{
  font-family: var(--font-display);
  font-weight: var(--display-weight);
  font-size: var(--display-size);
  line-height: var(--display-line);
  letter-spacing: var(--display-tracking);
  margin: 0 0 36px;
  color: var(--ink);
}
/* Line-by-line reveal: each line's inner text rises from behind a clip edge. */
h1 .line{
  display: block;
  overflow: hidden;
  padding-block: 0.07em;
  margin-block: -0.07em;
}
h1 .line-inner{
  display: block;
  text-wrap: balance;
  transform: translateY(120%);
  animation: lineRise 820ms cubic-bezier(0.2, 0.65, 0.28, 1) forwards;
}
h1 .line:nth-child(1) .line-inner{ animation-delay: 140ms; }
h1 .line:nth-child(2) .line-inner{ animation-delay: 265ms; }
h1 .line:nth-child(3) .line-inner{ animation-delay: 390ms; }
h1 em{
  font-style: italic;
  color: var(--ink);
}
@keyframes lineRise{
  to{ transform: translateY(0); }
}
@keyframes fadeUp{
  to{ opacity: 1; transform: none; }
}

.cta-row{
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
  margin-top: 8px;
  opacity: 0;
  transform: translateY(12px);
  animation: fadeUp 720ms cubic-bezier(0.22, 0.61, 0.36, 1) 820ms forwards;
}
.cta{
  appearance: none;
  border: 0;
  background: var(--ink);
  color: var(--bg);
  font-family: "Inter", sans-serif;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.005em;
  padding: 16px 26px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 200ms ease, transform 200ms ease;
}
.cta:hover{ background: #2a261f; }
.cta:active{ transform: translateY(1px); }
.cta:focus-visible{
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
.hint{
  font-size: 13px;
  color: var(--muted);
  letter-spacing: 0.02em;
}

/* ---------- Footer ---------- */
footer{
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 28px 40px;
  font-size: 13px;
  color: var(--muted);
  letter-spacing: 0.02em;
  opacity: 0;
  transform: translateY(7px);
  animation: fadeUp 720ms cubic-bezier(0.22, 0.61, 0.36, 1) 1000ms forwards;
}
footer a{
  color: var(--muted);
  text-decoration: none;
  transition: color 200ms ease;
}
footer a:hover{ color: var(--ink); }

/* ---------- Modal ---------- */
.modal-backdrop{
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(28, 26, 22, 0.32);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  overflow-y: auto;
  opacity: 0;
  pointer-events: none;
  transition: opacity 220ms ease;
}
.modal-backdrop.open{
  opacity: 1;
  pointer-events: auto;
}
.modal{
  background: var(--bg);
  border-radius: 14px;
  width: 100%;
  max-width: 480px;
  padding: 40px 40px 32px;
  box-shadow: 0 20px 60px rgba(28, 26, 22, 0.12);
  transform: translateY(8px) scale(0.99);
  transition: transform 240ms cubic-bezier(0.22, 0.61, 0.36, 1);
  position: relative;
}
.modal-backdrop.open .modal{ transform: translateY(0) scale(1); }
.modal h2{
  font-family: var(--font-display);
  font-weight: var(--display-weight);
  font-size: 32px;
  line-height: 1.1;
  letter-spacing: var(--display-tracking);
  margin: 0 0 8px;
}
.modal p.lede{
  color: var(--muted);
  font-size: 14px;
  margin: 0 0 24px;
}
.field{
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}
.field label{
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.field input,
.field textarea{
  font-family: "Inter", sans-serif;
  font-size: 15px;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--rule);
  padding: 8px 0;
  outline: none;
  transition: border-color 180ms ease;
  resize: none;
}
.field input:focus,
.field textarea:focus{ border-bottom-color: var(--ink); }
.field input[aria-invalid="true"],
.field textarea[aria-invalid="true"]{ border-bottom-color: var(--error); }
.field textarea{ min-height: 64px; }
.field-error{
  font-size: 12px;
  color: var(--error);
  letter-spacing: 0.01em;
}
.field-error:empty{ display: none; }

/* Honeypot — present in the DOM, hidden from people. */
.hp-field{
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.modal-actions{
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 24px;
}
.modal-actions .send{
  appearance: none;
  border: 0;
  background: var(--ink);
  color: var(--bg);
  font-family: "Inter", sans-serif;
  font-size: 14px;
  font-weight: 500;
  padding: 12px 22px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 200ms ease;
}
.modal-actions .send:hover{ background: #2a261f; }
.modal-actions .send:disabled{ cursor: default; opacity: 0.7; }
.modal-actions .send:focus-visible{
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
.form-status{
  font-size: 13px;
  margin: 14px 0 0;
}
.form-status:empty{ display: none; }
.form-status[data-state="success"]{ color: var(--success); }
.form-status[data-state="error"]{ color: var(--error); }
.modal-close{
  position: absolute;
  top: 16px;
  right: 16px;
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 20px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 180ms ease, background 180ms ease;
  line-height: 1;
}
.modal-close:hover{
  color: var(--ink);
  background: rgba(28, 26, 22, 0.04);
}
.modal-meta{
  font-size: 13px;
  color: var(--muted);
}
.modal-meta-link{
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--rule);
}

/* ---------- Confirmation (after a successful send) ---------- */
.modal-confirm{ display: none; }
.modal.is-sent #modalTitle,
.modal.is-sent p.lede,
.modal.is-sent #contactForm{ display: none; }
.modal.is-sent .modal-confirm{
  display: block;
  text-align: center;
  padding: 16px 6px 12px;
}
.confirm-badge{
  width: 62px;
  height: 62px;
  margin: 4px auto 24px;
  border-radius: 50%;
  background: var(--success);
  display: flex;
  align-items: center;
  justify-content: center;
  transform: scale(0.4);
  opacity: 0;
  animation: confirmBadgeIn 480ms cubic-bezier(0.34, 1.42, 0.5, 1) 80ms forwards;
}
.confirm-badge svg{ width: 31px; height: 31px; display: block; }
.confirm-check{
  stroke-dasharray: 22;
  stroke-dashoffset: 22;
  animation: confirmCheckDraw 440ms cubic-bezier(0.65, 0, 0.35, 1) 340ms forwards;
}
.confirm-title{
  font-family: var(--font-display);
  font-weight: var(--display-weight);
  font-size: 31px;
  line-height: 1.12;
  letter-spacing: var(--display-tracking);
  margin: 0 0 11px;
  color: var(--ink);
  opacity: 0;
  transform: translateY(9px);
  animation: confirmRise 580ms cubic-bezier(0.22, 0.61, 0.36, 1) 380ms forwards;
}
.confirm-text{
  font-size: 14.5px;
  line-height: 1.62;
  color: var(--muted);
  max-width: 322px;
  margin: 0 auto;
  opacity: 0;
  transform: translateY(9px);
  animation: confirmRise 580ms cubic-bezier(0.22, 0.61, 0.36, 1) 490ms forwards;
}
@keyframes confirmBadgeIn{ to{ transform: scale(1); opacity: 1; } }
@keyframes confirmCheckDraw{ to{ stroke-dashoffset: 0; } }
@keyframes confirmRise{ to{ opacity: 1; transform: none; } }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce){
  h1 .line-inner, .cta-row, nav .mark, .info, footer,
  .confirm-badge, .confirm-title, .confirm-text{
    opacity: 1;
    transform: none;
    animation: none;
  }
  .confirm-check{ stroke-dashoffset: 0; animation: none; }
  .modal-backdrop, .modal{ transition: none; }
}

@media (max-width: 640px){
  nav, footer{ padding: 22px 24px; }
  main{ padding: 24px; }
  h1{ margin-bottom: 28px; }
  .modal{ padding: 32px 24px 24px; }
  .info{ font-size: 12px; }
}
