/* ============================================================
   Alex Aundrey — Beta Reader & Editor
   Editorial / literary design system
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,300..700;1,9..144,400..600&family=Archivo:wght@400;500;600;700&display=swap');

:root {
  /* Palette — warm paper, deep forest ink, burgundy, copper */
  --paper: #f4ede0;
  --paper-2: #ece2d0;
  --ink: #221d16;
  --ink-soft: #4a4237;
  --forest: #1f352c;
  --forest-deep: #142520;
  --burgundy: #7a2c33;
  --burgundy-deep: #5e2027;
  --copper: #b9793c;
  --copper-light: #d9a463;
  --line: rgba(34, 29, 22, 0.14);
  --paper-rgb: 244, 237, 224;

  --serif: 'Fraunces', Georgia, serif;
  --sans: 'Archivo', -apple-system, BlinkMacSystemFont, sans-serif;

  --container: 1180px;
  --radius: 2px;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 2000;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: multiply;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.12;
  margin: 0 0 0.5em;
  letter-spacing: -0.01em;
  color: var(--forest-deep);
}

p {
  margin: 0 0 1.1em;
  color: var(--ink-soft);
}

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 32px;
}

/* -------------------------------------------------- page fade-in -------------------------------------------------- */
body {
  opacity: 0;
  animation: page-in 0.7s var(--ease) 0.05s forwards;
}
@keyframes page-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* -------------------------------------------------- nav -------------------------------------------------- */
.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 500;
  padding: 26px 0;
  transition: padding 0.4s var(--ease), background-color 0.4s var(--ease), box-shadow 0.4s var(--ease);
}

.site-nav .nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-nav.scrolled {
  padding: 12px 0;
  background: rgba(var(--paper-rgb), 0.92);
  backdrop-filter: blur(10px);
  box-shadow: 0 1px 0 var(--line);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  transition: width 0.4s var(--ease), height 0.4s var(--ease);
}

.site-nav.scrolled .brand img {
  width: 32px;
  height: 32px;
}

.brand-name {
  font-family: var(--serif);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--forest-deep);
  letter-spacing: 0.01em;
}

.brand-role {
  display: block;
  font-family: var(--sans);
  font-size: 0.6rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--copper);
  margin-top: 1px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 40px;
}

.nav-links a {
  position: relative;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink);
  padding: 4px 0;
}

.nav-links a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 0%;
  height: 1px;
  background: var(--copper);
  transition: width 0.35s var(--ease);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

.nav-links a.active {
  color: var(--burgundy);
}

.nav-cta {
  border: 1px solid var(--forest-deep);
  padding: 9px 20px !important;
  border-radius: var(--radius);
  text-transform: uppercase;
  transition: background-color 0.3s var(--ease), color 0.3s var(--ease);
}
.nav-cta::after { display: none; }
.nav-cta:hover {
  background: var(--forest-deep);
  color: var(--paper);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.nav-toggle span {
  width: 24px;
  height: 2px;
  background: var(--ink);
  transition: transform 0.3s var(--ease), opacity 0.3s var(--ease);
}

@media (max-width: 860px) {
  .nav-toggle { display: flex; }
  .nav-links {
    position: fixed;
    top: 0;
    right: 0;
    height: 100vh;
    width: min(78vw, 340px);
    background: var(--forest-deep);
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 28px;
    padding: 40px;
    transform: translateX(100%);
    transition: transform 0.45s var(--ease);
  }
  .nav-links.open { transform: translateX(0); }
  .nav-links a { color: var(--paper); font-size: 1.1rem; }
  .nav-links a.active { color: var(--copper-light); }
  .nav-cta { border-color: var(--copper); }
  body.nav-open { overflow: hidden; }
}

/* -------------------------------------------------- buttons -------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--sans);
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 15px 30px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), background-color 0.3s var(--ease), color 0.3s var(--ease);
}
.btn-primary {
  background: var(--forest-deep);
  color: var(--paper);
}
.btn-primary:hover {
  background: var(--burgundy-deep);
  transform: translateY(-2px);
  box-shadow: 0 10px 24px -8px rgba(34,29,22,0.4);
}
.btn-ghost {
  border-color: var(--ink);
  color: var(--ink);
}
.btn-ghost:hover {
  border-color: var(--burgundy);
  color: var(--burgundy);
  transform: translateY(-2px);
}
.btn-arrow { transition: transform 0.3s var(--ease); }
.btn:hover .btn-arrow { transform: translateX(4px); }

/* -------------------------------------------------- hero -------------------------------------------------- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding-top: 90px;
  background: linear-gradient(180deg, var(--paper) 0%, var(--paper-2) 100%);
}

.hero-layers {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-layer {
  position: absolute;
  will-change: transform;
}

.layer-page {
  top: 12%;
  right: 8%;
  width: 220px;
  opacity: 0.9;
}
.layer-ink {
  bottom: 6%;
  left: 4%;
  width: 340px;
  opacity: 0.85;
}
.layer-underline {
  top: 40%;
  left: 52%;
  width: 260px;
  opacity: 0.5;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 760px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--burgundy);
  margin-bottom: 22px;
}
.eyebrow::before {
  content: '';
  width: 26px;
  height: 1px;
  background: var(--copper);
}

.hero h1 {
  font-size: clamp(2.6rem, 6vw, 4.6rem);
  color: var(--forest-deep);
}

.hero h1 .accent {
  color: var(--burgundy);
  font-style: italic;
}

.hero-sub {
  font-size: 1.15rem;
  max-width: 540px;
  color: var(--ink-soft);
  margin-top: 20px;
}

.hero-actions {
  display: flex;
  gap: 18px;
  margin-top: 40px;
  flex-wrap: wrap;
}

.scroll-cue {
  position: absolute;
  bottom: 40px;
  left: 32px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-soft);
  z-index: 2;
}
.scroll-cue .line {
  width: 1px;
  height: 34px;
  background: var(--ink-soft);
  position: relative;
  overflow: hidden;
}
.scroll-cue .line::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 40%;
  background: var(--copper);
  animation: scroll-drip 2.2s ease-in-out infinite;
}
@keyframes scroll-drip {
  0% { transform: translateY(-100%); }
  100% { transform: translateY(250%); }
}

/* -------------------------------------------------- reveal on scroll -------------------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal-delay-1 { transition-delay: 0.08s; }
.reveal-delay-2 { transition-delay: 0.16s; }
.reveal-delay-3 { transition-delay: 0.24s; }
.reveal-delay-4 { transition-delay: 0.32s; }

/* -------------------------------------------------- section basics -------------------------------------------------- */
section {
  position: relative;
  padding: 120px 0;
}
.section-tight { padding: 90px 0; }

.section-head {
  max-width: 680px;
  margin-bottom: 64px;
}
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }

.kicker {
  display: block;
  font-size: 0.76rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--copper);
  margin-bottom: 14px;
  font-family: var(--sans);
  font-weight: 600;
}

.section-head h2 {
  font-size: clamp(2rem, 3.4vw, 2.9rem);
}

.divider {
  width: 64px;
  height: 2px;
  background: var(--copper);
  margin: 0 0 28px;
}
.section-head.center .divider { margin-inline: auto; }

/* -------------------------------------------------- how-i-work teaser -------------------------------------------------- */
.work-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
}

.work-item {
  border-top: 1px solid var(--line);
  padding-top: 26px;
}
.work-item .num {
  font-family: var(--serif);
  font-style: italic;
  color: var(--copper);
  font-size: 1.6rem;
  display: block;
  margin-bottom: 10px;
}

/* -------------------------------------------------- genre tags -------------------------------------------------- */
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}
.tag {
  border: 1px solid var(--line);
  padding: 10px 20px;
  border-radius: 30px;
  font-size: 0.82rem;
  letter-spacing: 0.03em;
  color: var(--ink-soft);
  transition: border-color 0.3s var(--ease), color 0.3s var(--ease), background-color 0.3s var(--ease), transform 0.3s var(--ease);
}
.tag:hover {
  border-color: var(--burgundy);
  color: var(--burgundy);
  background: rgba(122,44,51,0.06);
  transform: translateY(-3px);
}

/* -------------------------------------------------- pill / badge -------------------------------------------------- */
.pill {
  display: inline-block;
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 6px 14px;
  border-radius: 30px;
  background: var(--forest-deep);
  color: var(--paper);
}
.pill-burgundy { background: var(--burgundy); }
.pill-copper { background: var(--copper); color: var(--ink); }

/* -------------------------------------------------- band (alt background) -------------------------------------------------- */
.band {
  background: var(--forest-deep);
  color: var(--paper);
}
.band h2, .band h3, .band h4 { color: var(--paper); }
.band p { color: rgba(244,237,224,0.78); }
.band .divider { background: var(--copper-light); }
.band .kicker { color: var(--copper-light); }

/* -------------------------------------------------- footer -------------------------------------------------- */
footer {
  background: var(--forest-deep);
  color: rgba(244,237,224,0.7);
  padding: 70px 0 34px;
}
.footer-top {
  display: flex;
  justify-content: space-between;
  gap: 40px;
  flex-wrap: wrap;
  padding-bottom: 46px;
  border-bottom: 1px solid rgba(244,237,224,0.14);
}
.footer-brand .brand-name { color: var(--paper); }
.footer-links {
  display: flex;
  gap: 34px;
  flex-wrap: wrap;
}
.footer-links a {
  font-size: 0.85rem;
  letter-spacing: 0.03em;
  color: rgba(244,237,224,0.75);
  transition: color 0.3s var(--ease);
}
.footer-links a:hover { color: var(--copper-light); }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  padding-top: 26px;
  font-size: 0.78rem;
  flex-wrap: wrap;
  gap: 10px;
}

/* -------------------------------------------------- responsive -------------------------------------------------- */
@media (max-width: 900px) {
  .work-grid { grid-template-columns: 1fr; gap: 44px; }
  section { padding: 90px 0; }
  .hero { padding-top: 110px; }
  .layer-page { width: 130px; }
  .layer-ink { width: 210px; }
}

@media (max-width: 600px) {
  .container { padding: 0 22px; }
  .hero-actions { flex-direction: column; align-items: flex-start; }
  .scroll-cue { display: none; }
}
