/* ============================================
   Aumnia AI — calm editorial, pre-dawn palette
   ============================================ */

:root {
  --bg: #F2EDE4;
  --bg-warm: #ECE3D2;
  --ink: #1A1814;
  --ink-muted: #6B6557;
  --ink-faint: #A39B8A;
  --rule: #D6CDB9;
  --rule-soft: #E2D9C6;
  --accent: #A8513C;
  --accent-warm: #C97A5C;

  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Instrument Sans", "Helvetica Neue", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --max-w: 1240px;
  --pad-x: clamp(1.5rem, 5vw, 4rem);

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
}

/* Reset */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

html {
  font-size: clamp(15.5px, 0.6vw + 0.6rem, 17.5px);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
  text-rendering: optimizeLegibility;
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.55;
  font-feature-settings: "kern", "ss01";
  position: relative;
  overflow-x: hidden;
  min-height: 100svh;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; padding: 0; margin: 0; }
hr { border: 0; height: 1px; background: var(--rule); margin: 0; }

::selection { background: var(--accent); color: var(--bg); }

/* Atmosphere — warm horizon gradient + paper grain */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(70% 60% at 88% -8%, rgba(201, 122, 92, 0.13), transparent 60%),
    radial-gradient(60% 70% at -8% 110%, rgba(168, 81, 60, 0.07), transparent 60%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-warm) 100%);
  z-index: -2;
  pointer-events: none;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 0.5 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  opacity: 0.32;
  mix-blend-mode: multiply;
  z-index: -1;
  pointer-events: none;
}

/* Type defaults */
h1, h2, h3 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 350;
  font-variation-settings: "opsz" 144, "SOFT" 25;
  letter-spacing: -0.025em;
  line-height: 1.04;
  color: var(--ink);
}

p { margin: 0; }

em {
  font-style: italic;
  font-variation-settings: "opsz" 144, "SOFT" 100;
  color: var(--accent);
}

/* ========== Header ========== */
.site-head {
  position: fixed;
  top: 0; left: 0; right: 0;
  padding: 1.25rem var(--pad-x);
  z-index: 50;
  pointer-events: none;
  background: linear-gradient(to bottom, rgba(242, 237, 228, 0.78) 0%, rgba(242, 237, 228, 0) 100%);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.head-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  pointer-events: auto;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.18rem;
  font-variation-settings: "opsz" 24, "SOFT" 50;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.brand__mark {
  color: var(--accent);
  display: inline-flex;
  animation: breathe 5.5s var(--ease-in-out) infinite;
  transform-origin: center;
}
@keyframes breathe {
  0%, 100% { transform: scale(1); opacity: 0.9; }
  50%      { transform: scale(1.08); opacity: 1; }
}

.site-nav {
  display: flex;
  gap: 1.75rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: lowercase;
  color: var(--ink-muted);
}
.site-nav a {
  position: relative;
  padding: 0.25rem 0;
  transition: color 0.3s var(--ease-out);
}
.site-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0.05rem;
  height: 1px;
  width: 0;
  background: currentColor;
  transition: width 0.4s var(--ease-out);
}
.site-nav a:hover { color: var(--ink); }
.site-nav a:hover::after { width: 100%; }

@media (max-width: 600px) {
  .site-nav { gap: 1rem; font-size: 0.72rem; }
  .brand { font-size: 1.05rem; }
}

/* ========== Hero ========== */
.hero {
  min-height: 100svh;
  padding: clamp(7rem, 14vh, 10rem) var(--pad-x) clamp(3rem, 7vw, 5rem);
  display: flex;
  align-items: flex-end;
  position: relative;
}
.hero-inner {
  max-width: var(--max-w);
  width: 100%;
  margin: 0 auto;
}

.hero-title {
  font-size: clamp(3rem, 9.5vw, 8.75rem);
  font-weight: 320;
  line-height: 0.96;
  letter-spacing: -0.038em;
  font-variation-settings: "opsz" 144, "SOFT" 25;
  max-width: 17ch;
}
.hero-title .line {
  display: block;
  opacity: 0;
  transform: translateY(0.45em);
  animation: rise 1s var(--ease-out) forwards;
  animation-delay: calc(var(--i) * 110ms + 220ms);
}
@keyframes rise {
  to { opacity: 1; transform: translateY(0); }
}

.hero-foot {
  margin-top: clamp(3rem, 6vw, 5rem);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: clamp(1.5rem, 4vw, 4rem);
  align-items: start;
}
.horizon {
  height: 1px;
  background: linear-gradient(to right, var(--accent) 0%, var(--rule) 55%, transparent 100%);
  width: 100%;
  margin-top: 0.7rem;
  transform-origin: left center;
  transform: scaleX(0);
  opacity: 0;
  animation: drawHorizon 1.6s var(--ease-out) 0.85s forwards;
}
@keyframes drawHorizon {
  to { transform: scaleX(1); opacity: 1; }
}

.hero-blurb {
  font-size: clamp(1rem, 0.4vw + 0.95rem, 1.18rem);
  line-height: 1.55;
  color: var(--ink-muted);
  max-width: 40ch;
  opacity: 0;
  transform: translateY(0.4em);
  animation: rise 1s var(--ease-out) 0.95s forwards;
}

.hero-corner {
  position: absolute;
  right: var(--pad-x);
  bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-faint);
  opacity: 0;
  animation: rise 1s var(--ease-out) 1.4s forwards;
}
.hero-corner__arrow {
  color: var(--accent);
  font-size: 0.85rem;
  display: inline-block;
  animation: nudgeY 2.4s var(--ease-in-out) infinite;
}
@keyframes nudgeY {
  0%, 100% { transform: translate(0, 0); }
  50%      { transform: translate(2px, 2px); }
}

@media (max-width: 740px) {
  .hero {
    min-height: auto;
    align-items: flex-start;
    padding-top: clamp(5.5rem, 16vh, 8rem);
    padding-bottom: clamp(3rem, 8vw, 5rem);
  }
  .hero-foot { grid-template-columns: 1fr; gap: 1.5rem; }
  .horizon { max-width: 8rem; }
  .hero-corner { display: none; }
}

/* ========== Sections ========== */
.section {
  padding: clamp(5rem, 12vw, 9rem) var(--pad-x);
  position: relative;
}
.section-inner {
  max-width: var(--max-w);
  margin: 0 auto;
}

.sec-mark {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: clamp(2rem, 4vw, 3rem);
  display: flex;
  align-items: center;
  gap: 0.85rem;
}
.sec-mark::before {
  content: "";
  width: 1.75rem;
  height: 1px;
  background: var(--accent);
  flex-shrink: 0;
}
.sec-mark span {
  color: var(--accent);
}

.sec-title {
  font-size: clamp(2.1rem, 5vw, 4.4rem);
  line-height: 1.04;
  letter-spacing: -0.025em;
  max-width: 22ch;
  font-variation-settings: "opsz" 144, "SOFT" 30;
  font-weight: 340;
}

.prose-inline {
  font-size: 1.05rem;
  line-height: 1.6;
  color: var(--ink-muted);
  max-width: 42ch;
}

/* ========== CTA ========== */
.section--cta { padding-bottom: clamp(7rem, 14vw, 12rem); }

.sec-title--cta {
  font-style: italic;
  font-weight: 320;
  font-variation-settings: "opsz" 144, "SOFT" 70;
  max-width: 18ch;
}
.cta-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.95rem 1.5rem 1rem;
  margin-top: clamp(2rem, 4vw, 3rem);
  border: 1px solid var(--ink);
  border-radius: 999px;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: 0;
  color: var(--ink);
  background: transparent;
  transition:
    background 0.4s var(--ease-out),
    color 0.4s var(--ease-out),
    border-color 0.4s var(--ease-out),
    transform 0.4s var(--ease-out);
}
.cta-pill__arrow {
  display: inline-flex;
  color: var(--accent);
  transition: transform 0.45s var(--ease-out), color 0.4s var(--ease-out);
}
.cta-pill:hover {
  background: var(--ink);
  color: var(--bg);
  border-color: var(--ink);
}
.cta-pill:hover .cta-pill__arrow {
  color: var(--accent-warm);
  transform: translate(2px, -2px);
}
.cta-pill:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

.contact-note { margin-top: clamp(1.75rem, 3vw, 2.5rem); }

/* ========== Footer ========== */
.site-foot {
  padding: 2rem var(--pad-x) 2.5rem;
  border-top: 1px solid var(--rule);
}
.foot-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.06em;
  color: var(--ink-muted);
  text-transform: uppercase;
  flex-wrap: wrap;
  gap: 1rem;
}
.foot-mark {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}
.foot-mark .brand__mark { color: var(--accent); animation: none; }

/* ========== Reduced motion ========== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .hero-title .line, .hero-blurb, .horizon, .hero-corner {
    opacity: 1;
    transform: none;
  }
}
