/* ========== Base reset (remove browser default spacing) ========== */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
}

h1, h2, h3, h4, h5, h6,
p,
ul, ol, li,
figure {
  margin: 0;
  padding: 0;
}

img {
  max-width: 100%;
  display: block;
}

/* ========== Base tokens (single source of spacing truth) ========== */
:root {
  --page-max: 1100px;
  --gutter: 32px;

  --section-pad-y: 88px;

  --stack-gap: 16px;
  --stack-gap-lg: 28px;

  --radius-soft: 16px;

  --bg-page: #F7F2EA;      /* warm parchment */
  --bg-services: #F1E6D8;  /* soft sand */
  --bg-contact: #EEE2D6;   /* warm linen */
  --bg-card: #FBFAF6;      /* paper (not pure white) */

  --accent-focus: #EEE2D6;
}

/* ========== Layout containers ========== */
.section {
  padding: var(--section-pad-y) var(--gutter);
}

.section > * {
  max-width: var(--page-max);
  margin-left: auto;
  margin-right: auto;
}

/* A simple vertical rhythm tool: spacing is owned by the parent */
.stack > * + * {
  margin-top: var(--stack-gap);
}

.stack.stack-lg > * + * {
  margin-top: var(--stack-gap-lg);
}

/* ========== Type guardrails ========== */

h1, h2, h3 {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-weight: 500;
  letter-spacing: 0.03em;
}

h2 {
  text-transform: uppercase;
  font-size: clamp(1.75rem, 2.2vw, 2.25rem);
  line-height: 1.15;
}

h3 {
  font-size: clamp(1.25rem, 1.6vw, 1.55rem);
  line-height: 1.2;
}


/* Text blocks get controlled spacing only when wrapped */
.prose > * + * {
  margin-top: var(--stack-gap);
}

/* ========== Form guardrails ========== */

/* Honeypot field (anti-spam) */
.honeypot-field {
  position: absolute;
  left: -9999px;
  height: 0;
  overflow: hidden;
}

.form-field + .form-field {
  margin-top: var(--stack-gap);
}

.form-actions {
  margin-top: var(--stack-gap-lg);
}

/* ========== Header layout (desktop-oriented, always visible) ========== */

.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;

  max-width: var(--page-max);
  margin-left: auto;
  margin-right: auto;

  padding: 22px var(--gutter) 18px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.10);
}

.header-left {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Keep nav visible (no hamburger behavior) */
.main-nav ul {
  list-style: none;
  display: flex;
  gap: 22px;
  margin: 0;
  padding: 0;
  align-items: center;
}


/* ========== Navigation link basics ========== */
.main-nav a {
  text-decoration: none;
  color: inherit;

  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 0.95rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;

  font-weight: 500;
  opacity: 0.88;
}


.main-nav a:hover,
.main-nav a:focus-visible {
  text-decoration: underline;
  text-underline-offset: 6px;
  opacity: 1;
}

/* ========== Section 1: Hero layout ========== */

.hero-visual {
  position: relative;
  width: 100%;
  min-height: 560px; /* will be tuned later */
  border-radius: var(--radius-soft);
  overflow: hidden;
}

.hero-message {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  text-align: center;
  pointer-events: none; /* text overlay should not block interactions */
  z-index: 2;
}

/* All hero images occupy the same space */
.hero-visual figure {
  position: absolute;
  inset: 0;
  margin: 0;
}

/* Default: hidden (we'll control visibility in JS later) */
.hero-frame,
.hero-composite {
  opacity: 0;
  visibility: hidden;
}

/* Initial state: show image 1 */
.hero-frame-1 {
  opacity: 1;
  visibility: visible;
}

/* ========== Hero fade behavior (calm, non-flashy) ========== */
.hero-frame,
.hero-composite {
  transition: opacity 900ms ease;
}

/* ========== Hero message typography ========== */
.hero-message {
  font-size: clamp(2.6rem, 3.6vw, 3.8rem);
  line-height: 1.22;
  font-weight: 400;
  text-shadow:
  0 0 8px rgba(255, 255, 255, 0.55),
  0 0 18px rgba(255, 255, 255, 0.35);
}

.hero-message p {
  margin: 0;
}

.hero-message > * {
  max-width: 34ch;
}

/* ========== Section 2: Services layout ========== */
.section-services .services-layout {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 48px;
  align-items: start;
}

.section-services .services-text {
  max-width: 52ch;
}

.section-services .services-text p {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.18rem;
  line-height: 1.45;
  font-weight: 400;
  letter-spacing: 0.01em;
}


/* Make the abstract feel present but quiet */
.section-services .services-abstract {
  min-height: 260px;
  border-radius: var(--radius-soft);
}

/* ========== Section 2: Abstract micro-adjustment ========== */
.section-services .services-abstract {
  transform: scale(1.02);
  transition: transform 600ms ease;
}

/* Small viewport shifts the scale slightly (structural, not animated) */
@media (max-width: 900px) {
  .section-services .services-abstract {
    transform: scale(1.01);
  }
}

@media (max-width: 700px) {
  .section-services .services-layout {
    grid-template-columns: 1fr;
  }

  .section-services .services-abstract {
    transform: scale(1);
    min-height: 180px;
  }
}

/* ========== Section 3: Contact section ========== */

.section-contact {
  text-align: center;
}


.contact-wrap {
  max-width: 520px;
  width: 100%;
  margin-left: auto;
  margin-right: auto;
}

.section-contact .contact-box {
  border-radius: var(--radius-soft);
  padding: 28px;
  text-align: left;
}

/* Form controls: keep neutral and readable */

.form-field label {
  display: block;
  margin-bottom: 8px;
}

.section-contact input[type="email"] {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid currentColor;
  background: transparent;
}

.section-contact input[type="email"]:focus {
  outline: none;
  border-color: #EEE2D6;
  box-shadow: 0 0 0 3px rgba(238, 226, 214, 0.6);
}

.section-contact button[type="submit"] {
  padding: 12px 18px;
  border-radius: 12px;
  border: 1px solid currentColor;
  background: transparent;
  cursor: pointer;

  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.section-contact button[type="submit"]:active {
  background: #EEE2D6;
  border-color: #EEE2D6;
}

.section-contact button[type="submit"]:hover,
.section-contact button[type="submit"]:focus-visible {
  text-decoration: underline;
  text-underline-offset: 6px;
}

/* ========== Submission modal (thank-you card) ========== */
.modal[hidden] {
  display: none;
}

.modal {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;

  /* Gentle overlay, not heavy */
  background: rgba(0, 0, 0, 0.12);
}

.modal-card {
  width: min(520px, 100%);
  padding: 26px 26px 20px;
  border-radius: var(--radius-soft);

  /* Card feel */
  background: var(--bg-card);
  border: none;
}

.modal-card h3 {
  margin-bottom: 10px;
}

.modal-close {
  margin-top: 18px;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid currentColor;
  background: transparent;
  cursor: pointer;
}

/* ========== Quiet form requirement hint ========== */
.contact-box.is-missing-required {
  outline: 1px solid rgba(0, 0, 0, 0.35);
  outline-offset: 6px;
}

/* ========== Background colors ========== */
body {
  background: var(--bg-page);

  /* Base typography */
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 18px;
  line-height: 1.6;
  color: #2b2b2b;
}


/* Section backgrounds */
.section-hero {
  background: var(--bg-page);
}

.section-services {
  background: var(--bg-services);
}


.section-contact {
  background: var(--bg-contact);
}

/* Card-like containers */
.contact-box {
  background: var(--bg-card);
  border: none;
}

.modal-card {
  background: var(--bg-card);
}

/* ========== Hero frames (subtle structure) ========== */
.hero-frame,
.hero-composite {
  border-radius: var(--radius-soft);
  background: rgba(0, 0, 0, 0.04); /* placeholder tone until images load */
}

/* Slight inset so frames feel intentional, not edge-to-edge */
.hero-frame {
  inset: 18px; /* gives the frames a gallery-like margin */
}

/* Composite sits flush (final state) */
.hero-composite {
  inset: 0;
}

/* ========== Hero images fill their layers ========== */
.hero-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/* ========== Section 2 image fit ========== */
.section-services .services-abstract img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ========== Brand + AMI (header left) ========== */

.brand-name {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.25rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  line-height: 1.15;
  white-space: nowrap;
}

.ami-number {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
}

/* ========== Brand block (name + AMI as one unit) ========== */
.brand-block {
  display: flex;
  flex-direction: column;
  gap: 4px; /* tight, intentional */
}

.hero-message p::first-letter {
  font-family: "Rochester", cursive !important;
  font-size: 2.4em;
  line-height: 0.9;
}

/* Pull hero closer to header */
.section-hero {
  padding-top: 34px; /* overrides the global section padding for the first section */
}

/* Fancy initial letter */
.fancy-initial {
  font-family: 'Rochester', cursive;
  font-size: 2em;
  line-height: 1;
  margin-right: -3px;
}

.section-contact .contact-wrap.stack-lg>*+* {
  margin-top: calc(var(--stack-gap-lg) + 20px);
}

/* ========== Mobile header structure test: Steps 1–2 ========== */
@media (max-width: 700px) {

  /* Step 1: allow name to wrap */
  .brand-name {
    white-space: nowrap;
  }

  /* Step 2: stack and center header */
  .site-header {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 12px;
    padding-left: 18px;
    padding-right: 18px;
  }

  .brand-block {
    align-items: center;
  }

  .main-nav ul {
    justify-content: center;
    flex-wrap: wrap;
    gap: 0px 16px;
  }

  .main-nav a {
    padding: 10px 6px;
    display: inline-block;
  }


    /* Step 3: center section headings on mobile without centering body text */
  .section-services h2,
  .section-contact h2 {
    text-align: center;
  }

  .section-services p,
  .section-contact .contact-box {
    text-align: left;
  }

  .section-contact .form-field label {
    display: flex;
    align-items: center;
    gap: 10px;
    line-height: 1.35;
    padding: 6px 0;
  }

  .section-contact input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #EEE2D6;
  }

  .hero-message {
    font-size: clamp(2rem, 6vw, 2.6rem);
    line-height: 1.15;
  }

  .section-services .services-text p {
    font-size: 1.1rem;
    line-height: 1.65;
  }

  .section-contact input[type="email"] {
    padding: 14px 14px;
    font-size: 1rem;
  }

  .section-contact button[type="submit"] {
    width: 100%;
    padding: 14px 16px;
  }




}