/* ==========================================================================
   Main website (index.html)
   ========================================================================== */

html {
  scroll-behavior: smooth;
  scroll-padding-top: 84px; /* keeps headings clear of the sticky header */
}

.section {
  padding: clamp(72px, 11vw, 140px) 0;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  background: var(--brown);
  color: var(--white);
  text-decoration: none;
}

.skip-link:focus {
  top: 12px;
}

h2 {
  font-size: clamp(1.8rem, 3.6vw, 2.75rem);
}

/* Even line lengths, no single-word last lines */
h1, h2, h3 {
  text-wrap: balance;
}

.lead {
  font-family: var(--font-serif);
  font-size: clamp(1.15rem, 2vw, 1.35rem);
  line-height: 1.6;
  color: var(--brown);
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: clamp(36px, 5vw, 60px);
}

.section-head h2 {
  max-width: 18ch;
  margin: 0;
}

.section-head-center {
  flex-direction: column;
  align-items: center;
  text-align: center;
}

/* ---------- Header / navigation ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(246, 240, 231, 0.88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s, box-shadow 0.3s;
}

.site-header.is-scrolled {
  border-bottom-color: var(--line);
  box-shadow: 0 6px 24px -18px rgba(76, 55, 19, 0.5);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  gap: 24px;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 36px;
}

.site-nav ul {
  display: flex;
  gap: 28px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-nav ul a {
  position: relative;
  padding: 6px 0;
  font-size: 0.92rem;
  text-decoration: none;
  color: var(--ink-soft);
  transition: color 0.2s;
}

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

.site-nav ul a:hover,
.site-nav ul a.is-active {
  color: var(--brown);
}

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

.nav-cta {
  min-height: 44px;
  padding: 0.6em 1.3em;
  font-size: 0.88rem;
}

.nav-toggle {
  display: none;
  position: relative;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
}

.nav-toggle-bar {
  position: absolute;
  left: 13px;
  right: 13px;
  height: 1.5px;
  background: var(--brown);
  transition: transform 0.3s var(--ease-out);
}

.nav-toggle-bar:nth-of-type(2) { top: 18px; }
.nav-toggle-bar:nth-of-type(3) { top: 24px; }

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-of-type(2) { transform: translateY(3px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-of-type(3) { transform: translateY(-3px) rotate(-45deg); }

@media (max-width: 860px) {
  .nav-toggle {
    display: block;
    z-index: 2;
  }

  /* Drops down directly below the sticky header */
  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 20px;
    padding: 24px var(--gutter) 32px;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 24px 40px -30px rgba(76, 55, 19, 0.5);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 0.3s, transform 0.3s var(--ease-out), visibility 0.3s;
  }

  .site-nav.is-open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }

  .site-nav ul {
    flex-direction: column;
    gap: 0;
  }

  .site-nav ul a {
    display: block;
    padding: 14px 0;
    font-family: var(--font-serif);
    font-size: 1.2rem;
    border-bottom: 1px solid var(--line);
  }

  .site-nav ul a::after {
    display: none;
  }
}

/* ---------- Hero ---------- */
.hero {
  padding: clamp(40px, 6vw, 80px) 0 clamp(72px, 9vw, 120px);
  overflow: hidden;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: clamp(40px, 6vw, 90px);
  align-items: center;
}

.hero-title {
  font-size: clamp(2.6rem, 6.4vw, 5rem);
  line-height: 1.05;
  letter-spacing: -0.01em;
  margin-bottom: 0.35em;
}

.hero-title em {
  color: var(--olive);
}

.hero-tagline {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(1.1rem, 2vw, 1.3rem);
  color: var(--olive);
  margin-bottom: 1.2em;
}

.hero-intro {
  max-width: 46ch;
  font-size: 1.05rem;
  color: var(--ink-soft);
  margin-bottom: 2em;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* Stacked buttons share one width on small phones */
@media (max-width: 480px) {
  .hero-actions .btn {
    flex: 1 1 100%;
  }
}

/* Single arched photo, sized to stay within the first screen on laptops */
.hero-media {
  justify-self: end;
  width: 100%;
  max-width: 480px;
  height: clamp(380px, 70vh, 600px);
  border-radius: 999px 999px var(--radius) var(--radius);
  overflow: hidden;
}

@media (max-width: 860px) {
  .hero-inner {
    grid-template-columns: 1fr;
  }

  .hero-media {
    justify-self: center;
    max-width: 420px;
    height: auto;
    aspect-ratio: 1;
  }
}

/* ---------- About ---------- */
.about {
  background: var(--white);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.about-inner {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: clamp(32px, 7vw, 110px);
}

.about-heading h2 {
  max-width: 14ch;
}

.about-body p:not(.lead) {
  color: var(--ink-soft);
  max-width: 58ch;
}

@media (max-width: 760px) {
  .about-inner {
    grid-template-columns: 1fr;
  }
}

/* ---------- Services ---------- */
.service-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: clamp(16px, 2vw, 28px);
}

/* Editorial rhythm: two wide cards, then three */
.service-card:nth-child(1),
.service-card:nth-child(2) {
  grid-column: span 3;
}

.service-card:nth-child(n + 3) {
  grid-column: span 2;
}

.service-card {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
}

.service-card-media {
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 18px;
}

.service-card:nth-child(-n + 2) .service-card-media {
  aspect-ratio: 16 / 10;
}

.service-card-media .photo {
  transition: transform 0.9s var(--ease-out);
}

.service-card:hover .service-card-media .photo,
.service-card:focus-visible .service-card-media .photo {
  transform: scale(1.05);
}

.service-card h3 {
  font-size: clamp(1.15rem, 1.8vw, 1.4rem);
  margin-bottom: 0.4em;
}

.service-card p {
  font-size: 0.95rem;
  color: var(--ink-soft);
  margin-bottom: 0.8em;
}

.service-card-link {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--olive);
}

.service-card-link span {
  transition: transform 0.3s var(--ease-out);
}

.service-card:hover .service-card-link span {
  transform: translateX(4px);
}

@media (max-width: 900px) {
  .service-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .service-card:nth-child(n) {
    grid-column: span 1;
  }

  .service-card:nth-child(1) {
    grid-column: span 2;
  }
}

@media (max-width: 560px) {
  .service-grid {
    grid-template-columns: 1fr;
  }

  .service-card:nth-child(n) {
    grid-column: auto;
  }
}

/* ---------- Brand statement ---------- */
.statement {
  position: relative;
  overflow: hidden;
  padding: clamp(90px, 13vw, 170px) 0;
  background: var(--olive);
  color: var(--cream);
  text-align: center;
}

/* One quiet branch in the corner; sits behind the text */
.statement-sprig {
  position: absolute;
  left: -4%;
  bottom: -10%;
  width: clamp(160px, 26vw, 340px);
  height: clamp(160px, 26vw, 340px);
  color: var(--sage);
  opacity: 0.3;
  pointer-events: none;
}

.statement-inner {
  position: relative;
  max-width: 900px;
}

.statement-words {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 10px 16px;
  margin-bottom: 2em;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--cream);
}

.statement-words .dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--sage);
}

.statement-title {
  font-size: clamp(1.6rem, 3.6vw, 2.6rem);
  line-height: 1.35;
  color: var(--white);
  margin: 0;
}

/* ---------- How it works ---------- */
.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(20px, 3vw, 40px);
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: none;
}

.step {
  position: relative;
  padding-top: 28px;
  border-top: 1px solid var(--line-strong);
}

.step::before {
  content: "";
  position: absolute;
  top: -5px;
  left: 0;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--olive);
}

.step-num {
  display: block;
  font-family: var(--font-serif);
  font-size: 2.4rem;
  line-height: 1;
  color: var(--sage);
  margin-bottom: 18px;
}

.step h3 {
  font-size: 1.15rem;
}

.step p {
  font-size: 0.95rem;
  color: var(--ink-soft);
  margin: 0;
}

.process-note {
  max-width: 60ch;
  margin: clamp(40px, 5vw, 60px) auto 24px;
  text-align: center;
  font-size: 0.9rem;
  color: var(--ink-soft);
}

.process-cta {
  text-align: center;
}

@media (max-width: 900px) {
  .steps {
    grid-template-columns: repeat(2, 1fr);
    row-gap: 44px;
  }
}

@media (max-width: 520px) {
  .steps {
    grid-template-columns: 1fr;
  }
}

/* ---------- Contact ---------- */
.contact {
  padding-top: 0;
}

.contact-inner {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--white);
  border: 1px solid var(--line);
}

.contact-photo {
  min-height: 320px;
}

.contact-card {
  padding: clamp(32px, 5vw, 64px);
}

.contact-card > p {
  color: var(--ink-soft);
}

.contact-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px 32px;
  margin: 32px 0 36px;
}

.contact-list dt {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--olive);
  margin-bottom: 4px;
}

.contact-list dd {
  margin: 0;
  color: var(--brown);
}

.contact-list a {
  text-decoration: none;
}

.contact-list a:hover {
  text-decoration: underline;
}

.social-links {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
}

/* Makes unfinished placeholders easy to spot */
[data-placeholder] {
  color: var(--ink-soft);
  font-style: italic;
}

@media (max-width: 860px) {
  .contact-inner {
    grid-template-columns: 1fr;
  }

  .contact-photo {
    min-height: 220px;
  }
}

@media (max-width: 480px) {
  .contact-list {
    grid-template-columns: 1fr;
  }
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--brown);
  color: var(--cream);
  padding: 64px 0 28px;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 32px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(226, 212, 193, 0.18);
}

.footer-logo img {
  width: 150px;
  height: auto;
}

.footer-tagline {
  margin: 12px 0 0;
  font-family: var(--font-serif);
  font-style: italic;
  color: var(--cream);
  opacity: 0.85;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 28px;
}

.footer-nav a {
  font-size: 0.9rem;
  text-decoration: none;
  color: var(--cream);
  opacity: 0.85;
  padding: 6px 0;
}

.footer-nav a:hover {
  opacity: 1;
  text-decoration: underline;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 24px;
  font-size: 0.8rem;
  opacity: 0.7;
}

.footer-bottom p {
  margin: 0;
}

.dev-link {
  font-size: 0.75rem;
  color: var(--cream);
  opacity: 0.6;
}

/* ---------- Scroll reveal ---------- */
.js .reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out);
}

.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .js .reveal {
    opacity: 1;
    transform: none;
  }
}
