/* ==========================================================
   Mother City Macrons
   Styles
   ========================================================== */

/* ==========================================================
   Design tokens
   ========================================================== */
:root {
  --cream: #faf5ea;
  --cream-deep: #f2e8d0;
  --cream-glass: rgba(250, 245, 234, 0.88);
  --butter: #f2d479;
  --pistachio: #b5c285;
  --rose: #ecb0b8;
  --ink: #1c1a16;
  --ink-soft: #47423a;
  --ink-faint: #8b8478;
  --hairline: rgba(28, 26, 22, 0.12);
  --nav-height: 68px;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
}

/* ==========================================================
   Reset and base
   ========================================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--cream);
  color: var(--ink);
  font-family: 'Newsreader', Georgia, 'Times New Roman', serif;
  font-weight: 400;
  line-height: 1.65;
  font-size: 18px;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body.menu-open {
  overflow: hidden;
}

section[id], div[id="top"] {
  scroll-margin-top: calc(var(--nav-height) + 16px);
}

/* ==========================================================
   Color stripe motif
   ========================================================== */
.stripes {
  display: flex;
  width: 100%;
  height: 10px;
}

.stripe {
  flex: 1;
  height: 100%;
}

.stripe-butter { background: var(--butter); }
.stripe-pistachio { background: var(--pistachio); }
.stripe-rose { background: var(--rose); }

.divider {
  display: flex;
  width: 96px;
  height: 4px;
  margin: 0 auto;
  opacity: 0;
  transition: opacity 1s var(--ease-out);
}

.divider.revealed {
  opacity: 1;
}

/* ==========================================================
   Sticky navigation
   ========================================================== */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  background: var(--cream-glass);
  backdrop-filter: saturate(1.4) blur(12px);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  z-index: 50;
  transform: translateY(-100%);
  transition: transform 0.5s var(--ease-out);
  border-bottom: 1px solid var(--hairline);
}

.nav.is-visible {
  transform: translateY(0);
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 28px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-brand {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.nav-brand img {
  height: 38px;
  width: auto;
  display: block;
}

.nav-menu {
  list-style: none;
  display: flex;
  gap: 36px;
  align-items: center;
}

.nav-menu a {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 400;
  font-size: 1.05rem;
  color: var(--ink-soft);
  text-decoration: none;
  letter-spacing: 0.01em;
  position: relative;
  padding: 6px 2px;
  transition: color 0.25s ease;
}

.nav-menu a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.35s var(--ease-out);
}

.nav-menu a:hover {
  color: var(--ink);
}

.nav-menu a:hover::after,
.nav-menu a.is-active::after {
  transform: scaleX(1);
}

.nav-stripes {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  opacity: 0.7;
}

/* ==========================================================
   Mobile menu toggle (hamburger)
   ========================================================== */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  padding: 8px;
  cursor: pointer;
  width: 40px;
  height: 40px;
  position: relative;
  z-index: 101;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: var(--ink);
  margin: 5px auto;
  transition: transform 0.35s var(--ease-in-out), opacity 0.25s ease;
  transform-origin: center;
}

body.menu-open .nav-toggle span:nth-child(1) {
  transform: translateY(6.5px) rotate(45deg);
}

body.menu-open .nav-toggle span:nth-child(2) {
  opacity: 0;
}

body.menu-open .nav-toggle span:nth-child(3) {
  transform: translateY(-6.5px) rotate(-45deg);
}

/* ==========================================================
   Mobile menu overlay
   ========================================================== */
.mobile-menu {
  position: fixed;
  inset: 0;
  background: var(--cream);
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s var(--ease-out), visibility 0.4s;
}

body.menu-open .mobile-menu {
  opacity: 1;
  visibility: visible;
}

.mobile-menu-stripes {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 10px;
}

.mobile-menu ul {
  list-style: none;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.mobile-menu a {
  font-family: 'Fraunces', Georgia, serif;
  font-style: italic;
  font-weight: 400;
  font-size: 3rem;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -0.02em;
  line-height: 1;
  display: inline-block;
  opacity: 0;
  transform: translateY(24px);
  transition: color 0.25s ease;
}

body.menu-open .mobile-menu a {
  animation: menuItemReveal 0.7s var(--ease-out) forwards;
}

body.menu-open .mobile-menu li:nth-child(1) a { animation-delay: 0.15s; }
body.menu-open .mobile-menu li:nth-child(2) a { animation-delay: 0.25s; }
body.menu-open .mobile-menu li:nth-child(3) a { animation-delay: 0.35s; }

.mobile-menu a:hover {
  color: var(--rose);
}

@keyframes menuItemReveal {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ==========================================================
   Page header, above the hero
   ========================================================== */
header.page-header {
  display: flex;
  justify-content: center;
  padding: 72px 24px 32px;
  opacity: 0;
  animation: fadeIn 1s var(--ease-out) 0.15s forwards;
}

.logo-large {
  max-width: 180px;
  width: 100%;
  height: auto;
  display: block;
}

/* ==========================================================
   Hero tagline with word-by-word reveal
   ========================================================== */
.hero {
  padding: 32px 24px 64px;
  text-align: center;
}

.tagline {
  font-family: 'Fraunces', Georgia, serif;
  font-optical-sizing: auto;
  font-weight: 400;
  font-size: clamp(2.4rem, 7vw, 4.25rem);
  line-height: 1.02;
  letter-spacing: -0.025em;
  color: var(--ink);
  max-width: 900px;
  margin: 0 auto;
}

.tagline .line {
  display: block;
  overflow: hidden;
  padding-bottom: 0.12em;
  margin-bottom: -0.12em;
}

.tagline .line-2 {
  font-style: italic;
}

.tagline .word-wrap {
  display: inline-block;
  overflow: hidden;
  vertical-align: top;
}

.tagline .word {
  display: inline-block;
  transform: translateY(110%);
  opacity: 0;
  animation: wordReveal 0.9s var(--ease-out) forwards;
}

.tagline .word-wrap:nth-of-type(1) .word { animation-delay: 0.4s; }
.tagline .word-wrap:nth-of-type(2) .word { animation-delay: 0.48s; }
.tagline .word-wrap:nth-of-type(3) .word { animation-delay: 0.56s; }
.line-2 .word-wrap:nth-of-type(1) .word { animation-delay: 0.72s; }
.line-2 .word-wrap:nth-of-type(2) .word { animation-delay: 0.80s; }
.line-2 .word-wrap:nth-of-type(3) .word { animation-delay: 0.88s; }
.line-2 .word-wrap:nth-of-type(4) .word { animation-delay: 0.96s; }

@keyframes wordReveal {
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* ==========================================================
   Banner image
   ========================================================== */
.banner {
  width: 100%;
  margin: 0 0 72px;
  padding: 0;
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 1.2s var(--ease-out) 1.1s, transform 1.2s var(--ease-out) 1.1s;
}

.banner.is-ready {
  opacity: 1;
  transform: translateY(0);
}

.banner-frame {
  overflow: hidden;
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 1;
}

.banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transition: transform 2s var(--ease-out);
}

.banner:hover img {
  transform: scale(1.03);
}

/* ==========================================================
   Story
   ========================================================== */
.story {
  padding: 32px 24px 80px;
  max-width: 820px;
  margin: 0 auto;
  text-align: center;
}

.story p {
  font-family: 'Newsreader', Georgia, serif;
  font-size: clamp(1.25rem, 2.2vw, 1.5rem);
  line-height: 1.65;
  color: var(--ink-soft);
  margin-bottom: 44px;
}

.signature {
  font-family: 'Fraunces', Georgia, serif;
  font-style: italic;
  font-weight: 400;
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  line-height: 1.2;
  color: var(--ink);
  letter-spacing: -0.015em;
  margin: 0;
  display: inline-block;
  position: relative;
}

.signature::after {
  content: "";
  position: absolute;
  left: 10%;
  right: 10%;
  bottom: -8px;
  height: 1px;
  background: var(--ink);
  opacity: 0.4;
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 1.4s var(--ease-out) 0.4s;
}

.story.revealed .signature::after {
  transform: scaleX(1);
}

/* ==========================================================
   Details, on a cream-deep card background
   ========================================================== */
.details-wrap {
  background: var(--cream-deep);
  padding: 80px 24px;
  position: relative;
}

.details-wrap::before,
.details-wrap::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--hairline);
}

.details-wrap::before { top: 0; }
.details-wrap::after { bottom: 0; }

.details {
  display: flex;
  justify-content: center;
}

.details ul {
  list-style: none;
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 400;
  font-size: 1.2rem;
  line-height: 2.1;
}

.details li {
  color: var(--ink);
  display: flex;
  align-items: baseline;
  opacity: 0;
  transform: translateX(-12px);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}

.details.revealed li { opacity: 1; transform: translateX(0); }
.details.revealed li:nth-child(1) { transition-delay: 0.05s; }
.details.revealed li:nth-child(2) { transition-delay: 0.20s; }
.details.revealed li:nth-child(3) { transition-delay: 0.35s; }
.details.revealed li:nth-child(4) { transition-delay: 0.50s; }

.tilde {
  display: inline-block;
  width: 1.5em;
  font-weight: 500;
  font-size: 1.15em;
  flex-shrink: 0;
}

.details li:nth-child(1) .tilde { color: var(--butter); }
.details li:nth-child(2) .tilde { color: var(--pistachio); }
.details li:nth-child(3) .tilde { color: var(--rose); }
.details li:nth-child(4) .tilde { color: var(--butter); }

/* ==========================================================
   Contact
   ========================================================== */
.contact {
  padding: 88px 24px 104px;
  text-align: center;
}

.contact-intro {
  font-family: 'Newsreader', Georgia, serif;
  font-style: italic;
  font-size: 1rem;
  color: var(--ink-soft);
  margin-bottom: 16px;
  letter-spacing: 0.01em;
}

.email-link {
  font-family: 'Fraunces', Georgia, serif;
  font-size: clamp(1.75rem, 5vw, 2.6rem);
  font-style: italic;
  font-weight: 400;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -0.015em;
  display: inline-flex;
  align-items: baseline;
  gap: 0.2em;
  position: relative;
  transition: color 0.3s ease;
}

.email-link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 1px;
  background: var(--ink);
  transition: background 0.3s ease;
}

.email-link .arrow {
  display: inline-block;
  transition: transform 0.35s var(--ease-out), color 0.3s ease;
  font-style: normal;
}

.email-link:hover {
  color: var(--rose);
}

.email-link:hover .arrow {
  transform: translateX(8px);
}

.email-link:hover::after {
  background: var(--rose);
}

.email-address {
  font-family: 'Newsreader', Georgia, serif;
  font-size: 0.95rem;
  color: var(--ink-soft);
  margin-top: 20px;
  letter-spacing: 0.02em;
}

/* ==========================================================
   Scroll reveal classes (applied by JS)
   ========================================================== */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 1s var(--ease-out), transform 1s var(--ease-out);
}

.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* ==========================================================
   Animations
   ========================================================== */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ==========================================================
   Responsive
   ========================================================== */
@media (max-width: 768px) {
  :root {
    --nav-height: 60px;
  }

  .nav-menu {
    display: none;
  }

  .nav-toggle {
    display: block;
  }

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

@media (max-width: 640px) {
  body {
    font-size: 16px;
  }

  header.page-header {
    padding: 48px 24px 16px;
  }

  .logo-large {
    max-width: 150px;
  }

  .hero {
    padding: 16px 24px 40px;
  }

  .banner {
    margin-bottom: 48px;
    padding: 0;
  }

  .banner-frame {
    aspect-ratio: 16 / 9;
  }

  .story {
    padding: 24px 16px 56px;
  }

  .details-wrap {
    padding: 56px 16px;
  }

  .details ul {
    font-size: 1.1rem;
    line-height: 2;
  }

  .contact {
    padding: 56px 24px 72px;
  }

  .mobile-menu a {
    font-size: 2.4rem;
  }
}

@media (min-width: 1024px) {
  header.page-header {
    padding: 100px 24px 40px;
  }

  .logo-large {
    max-width: 200px;
  }

  .hero {
    padding: 48px 24px 80px;
  }
}

/* ==========================================================
   Reduced motion
   ========================================================== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .tagline .word { transform: none; opacity: 1; }
  .banner { opacity: 1; transform: none; }
  .reveal { opacity: 1; transform: none; }
  .details li { opacity: 1; transform: none; }
  .signature::after { transform: scaleX(1); }
  .divider { opacity: 1; }
}er { opacity: 1; }
