/* =========================================================================
   Matt & Mookie — adoption site
   Design system lifted from the Claude Design handoff (turn 4).
   Warmth comes from photography and color, not rounded corners.
   ========================================================================= */

:root {
  /* Color */
  --cream: #f6f0e7;       /* primary light bg (letter) */
  --sand: #efe6d8;        /* secondary light bg (tiles, page surround) */
  --ink: #3b3129;         /* darkest brown — headings, dark sections */
  --body: #5b5045;        /* body copy on light */
  --body-muted: #6b5f52;  /* smaller body on sand */
  --tan: #a8907a;         /* eyebrow/label */
  --brown: #8a5f3d;       /* signature, links */
  --brown-hover: #5e3f27; /* link hover */
  --paper: #fbf3e4;       /* note/paper surfaces */
  --tape: rgba(228, 206, 172, .82);
  --caption: #7a6552;     /* handwritten captions */
  --on-dark: #fbf3e4;     /* text on --ink */

  /* Type */
  --serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --sans: "Karla", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --hand: "Caveat", "Segoe Script", cursive;

  --shadow-tile: 0 12px 30px rgba(80, 58, 40, .17);
  --shadow-letter: 0 14px 36px rgba(80, 58, 40, .2);
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--sand);
  color: var(--body);
  font-family: var(--sans);
  font-size: 13.5px;
  line-height: 1.95;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a { color: var(--brown); text-decoration: none; transition: color .18s ease; }
a:hover { color: var(--brown-hover); }

h1, h2, h3 { font-family: var(--serif); font-weight: 300; margin: 0; }

.balance { text-wrap: balance; }
.pretty  { text-wrap: pretty; }

/* Skip link for keyboard users */
.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--ink); color: var(--on-dark);
  padding: 10px 16px; z-index: 100; font-size: 12px; letter-spacing: .1em;
}
.skip:focus { left: 8px; top: 8px; }

/* ---- Shared layout ---- */
.wrap { max-width: 1140px; margin: 0 auto; }
.page { background: var(--sand); }

/* Eyebrow label */
.eyebrow {
  display: block;
  font: 400 9.5px/1 var(--sans);
  letter-spacing: .32em;
  text-transform: uppercase;
  color: var(--tan);
  margin-bottom: 20px;
}

/* ---- Buttons ---- */
.btn {
  display: inline-block;
  padding: 13px 30px;
  font: 400 10px/1 var(--sans);
  letter-spacing: .26em;
  text-transform: uppercase;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, .82);
  background: transparent;
  cursor: pointer;
  transition: background .18s ease, color .18s ease;
}
.btn--fill { border-color: rgba(255, 255, 255, .34); background: rgba(255, 255, 255, .15); }
.btn:hover { background: rgba(255, 255, 255, .28); }

/* Dark button used on light backgrounds (interior pages) */
.btn--ink {
  color: var(--on-dark);
  border-color: var(--ink);
  background: var(--ink);
}
.btn--ink:hover { background: var(--brown-hover); border-color: var(--brown-hover); color: #fff; }

/* Outline button on light */
.btn--line {
  color: var(--ink);
  border: 1px solid var(--tan);
  background: transparent;
}
.btn--line:hover { background: var(--ink); color: var(--cream); }

/* ---- Arch mark (chapel/window) ---- */
.arch {
  width: 74px; height: 96px;
  border: 1.2px solid rgba(255, 255, 255, .74);
  border-radius: 37px 37px 5px 5px;
  display: flex; align-items: center; justify-content: center;
}
.arch span {
  font: 400 27px/1 var(--serif);
  letter-spacing: .1em;
  color: rgba(255, 255, 255, .9);
}
.arch--ink { border-color: rgba(59, 49, 41, .5); }
.arch--ink span { color: var(--ink); }

/* ---- Site header (over hero, transparent) ---- */
.masthead {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 34px;
}
.masthead nav { display: flex; gap: 36px; }
.masthead nav.right { justify-content: flex-end; }
.masthead a {
  font: 400 10.5px/1 var(--sans);
  letter-spacing: .28em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .92);
}
.masthead a:hover, .masthead a[aria-current="page"] { color: #fff; }
.brandmark { display: flex; flex-direction: column; align-items: center; gap: 7px; }
.brandmark small {
  font: 400 8.5px/1 var(--sans);
  letter-spacing: .3em; text-transform: uppercase;
  color: rgba(255, 255, 255, .74);
}

/* Solid header variant for interior pages (ink on cream) */
.topbar {
  background: var(--cream);
  border-bottom: 1px solid #e7dccb;
}
.topbar .masthead { padding: 22px 54px; }
.topbar .masthead a { color: #6b5f52; }
.topbar .masthead a:hover, .topbar .masthead a[aria-current="page"] { color: var(--ink); }
.topbar .brandmark small { color: var(--tan); }

/* ---- HERO (home) ---- */
.hero {
  position: relative;
  height: 700px;
  overflow: hidden;
  background: #6b5443;
}
.hero .bg { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero .bg img {
  width: 100%; height: 100%;
  object-fit: cover; object-position: 56% 34%;
  filter: sepia(.34) saturate(.9) contrast(.97) brightness(1.05);
}
.hero .scrim {
  position: absolute; inset: 0;
  background: linear-gradient(180deg,
    rgba(104, 74, 50, .5) 0%,
    rgba(150, 112, 78, .08) 28%,
    rgba(74, 51, 34, .44) 62%,
    rgba(58, 40, 26, .8) 100%);
}
.hero .inner {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; justify-content: space-between;
  padding: 34px 54px;
}
.hero-copy {
  margin-top: auto;
  display: flex; flex-direction: column; align-items: center;
  text-align: center;
}
.hero-copy h1 {
  margin: 0 0 18px; max-width: 800px;
  font-size: 56px; line-height: 1.12; color: #fff;
}
.hero-copy .sub {
  margin: 0 0 28px; max-width: 480px;
  font-size: 13.5px; line-height: 1.9; color: rgba(255, 255, 255, .9);
}
.hero-copy .buttons { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; }
.footer-strip {
  margin-top: 34px; padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, .2);
  text-align: center;
  font: 400 9px/1 var(--sans);
  letter-spacing: .34em; text-transform: uppercase;
  color: rgba(255, 255, 255, .72);
}

/* ---- Sections ---- */
.section { padding: 76px 120px; }
.section--cream { background: var(--cream); }
.section--sand { background: var(--sand); }
.section--ink { background: var(--ink); color: var(--on-dark); }

.split {
  display: grid; grid-template-columns: 1fr 1fr; gap: 70px; align-items: center;
}

.letter h2 { margin: 0 0 20px; font-size: 34px; line-height: 1.32; color: var(--ink); }
.letter p { margin: 0 0 15px; color: var(--body); }
.letter p + p { margin-bottom: 26px; }
.signature { font: 400 30px/1 var(--hand); color: var(--brown); }

.section-head { text-align: center; }
.section-head .eyebrow { text-align: center; margin-bottom: 8px; }
.section-head h2 { font-size: 40px; line-height: 1; color: var(--ink); margin-bottom: 46px; }

/* ---- Taped photo component (build once, reuse) ---- */
.photo {
  position: relative;
  background: #fff;
  padding: 10px 10px 34px;
  box-shadow: var(--shadow-letter);
  transition: transform .22s ease-out;
}
.photo::before {
  content: "";
  position: absolute; top: -10px; left: 50%;
  transform: translateX(-50%) rotate(2deg);
  width: 78px; height: 21px; background: var(--tape);
}
.photo .frame { overflow: hidden; }
.photo img { width: 100%; height: 100%; object-fit: cover; filter: sepia(.28) saturate(.9); }
.photo figcaption {
  position: absolute; bottom: 9px; left: 0; right: 0;
  text-align: center; font: 500 17px/1 var(--hand); color: var(--caption);
}
.photo:hover { transform: rotate(0deg) translateY(-3px); }

/* Tilt variants — small, varied, never identical */
.tilt-a { transform: rotate(-2.2deg); }
.tilt-b { transform: rotate(2.6deg); }
.tilt-c { transform: rotate(-1.6deg); }
.tilt-d { transform: rotate(1.4deg); }
.tilt-e { transform: rotate(-0.8deg); }
.tilt-a::before { transform: translateX(-50%) rotate(2deg); }
.tilt-b::before { transform: translateX(-50%) rotate(-3deg); }
.tilt-c::before { transform: translateX(-50%) rotate(2deg); }
.tilt-d::before { transform: translateX(-50%) rotate(-3deg); }
.tilt-e::before { transform: translateX(-50%) rotate(3deg); }

/* Letter section photo cluster */
.photo-cluster { position: relative; height: 430px; }
.photo-cluster .photo { position: absolute; }
.photo-cluster .a { left: 0; top: 6px; width: 70%; }
.photo-cluster .a .frame { height: 250px; }
.photo-cluster .b { right: 0; bottom: 0; width: 54%; }
.photo-cluster .b .frame { height: 190px; }

/* Tiles */
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 44px; }
.tile .photo { padding: 11px 11px 12px; box-shadow: var(--shadow-tile); }
.tile .photo .frame { height: 210px; }
.tile h3 { margin: 26px 0 8px; font-size: 22px; line-height: 1.2; font-weight: 400; color: var(--ink); }
.tile p { margin: 0; font-size: 12.5px; line-height: 1.85; color: var(--body-muted); }

/* Closing invitation (dark band) */
.invite {
  display: flex; align-items: center; justify-content: space-between; gap: 50px;
  padding: 60px 120px;
}
.invite h2 { font-size: 32px; line-height: 1.25; color: var(--on-dark); margin-bottom: 8px; }
.invite p { margin: 0; font-size: 12.5px; line-height: 1.7; color: rgba(255, 255, 255, .6); }
.invite .btn { white-space: nowrap; padding: 16px 36px; border-color: rgba(255, 255, 255, .72); }

/* ---- Interior page hero band (smaller than home hero) ---- */
.pagehead {
  background: var(--cream);
  padding: 66px 120px 54px;
  text-align: center;
}
.pagehead h1 { font-size: 44px; line-height: 1.1; color: var(--ink); margin-bottom: 14px; }
.pagehead p { max-width: 560px; margin: 0 auto; color: var(--body); }

/* Prose column */
.prose { max-width: 680px; margin: 0 auto; }
.prose h2 { font-size: 30px; line-height: 1.3; color: var(--ink); margin: 40px 0 16px; }
.prose p { margin: 0 0 18px; color: var(--body); font-size: 14px; line-height: 2; }
.prose .lead { font-family: var(--serif); font-size: 20px; line-height: 1.6; color: var(--ink); }

/* Two-up profile (About) */
.profiles { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; }
.profile h2 { font-size: 30px; color: var(--ink); margin-bottom: 6px; }
.profile .role { font: 400 9.5px/1 var(--sans); letter-spacing: .3em; text-transform: uppercase; color: var(--tan); margin-bottom: 18px; display: block; }
.profile p { color: var(--body); font-size: 13.5px; }

/* Number cards (what a home looks like) */
.numbers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 54px; }
.numbers .num { font: 300 40px/1 var(--serif); color: #c9a883; }
.numbers .lbl { margin: 12px 0 8px; font: 400 10px/1 var(--sans); letter-spacing: .28em; text-transform: uppercase; color: #c9a883; }
.numbers p { margin: 0; font-size: 13px; line-height: 1.85; color: rgba(255, 255, 255, .72); }

/* Gallery (Photos) */
.gallery { columns: 3; column-gap: 30px; }
.gallery .photo { break-inside: avoid; margin: 0 0 30px; width: 100%; }
.gallery .photo .frame { height: auto; }
.gallery .photo img { height: auto; }

/* Q&A accordion */
.qa { max-width: 720px; margin: 0 auto; }
.qa details {
  border-bottom: 1px solid #e3d8c6;
}
.qa summary {
  list-style: none;
  cursor: pointer;
  padding: 22px 0;
  display: flex; justify-content: space-between; align-items: center; gap: 20px;
  font: 500 15px/1.4 var(--sans); color: var(--ink);
}
.qa summary::-webkit-details-marker { display: none; }
.qa summary .mark { font: 300 24px/1 var(--serif); color: var(--brown); transition: transform .2s ease; }
.qa details[open] summary .mark { transform: rotate(45deg); }
.qa .answer { padding: 0 0 24px; color: var(--body); font-size: 13.5px; line-height: 1.95; max-width: 620px; }

/* Draft banner (removed once copy is approved) */
.draft-note {
  background: #fff6e6; border: 1px dashed #d8b878; color: #7a5b2e;
  font-size: 11.5px; line-height: 1.6; letter-spacing: .02em;
  padding: 10px 16px; text-align: center;
}

/* ---- Contact form ---- */
.form { max-width: 460px; }
.form label { display: block; font: 400 10px/1 var(--sans); letter-spacing: .18em; text-transform: uppercase; color: var(--tan); margin: 0 0 8px; }
.form input, .form textarea {
  width: 100%;
  background: var(--paper);
  border: 1px solid #e5d7c3;
  padding: 13px 15px;
  font: 400 14px/1.6 var(--sans); color: var(--ink);
  margin-bottom: 18px;
}
.form textarea { min-height: 120px; resize: vertical; }
.form input:focus, .form textarea:focus { outline: 2px solid var(--tan); outline-offset: 1px; }
.form .btn { border: none; }
.form-success { font-family: var(--serif); font-size: 22px; line-height: 1.5; color: var(--ink); }

/* ---- Footer ---- */
.site-footer {
  background: var(--ink); color: rgba(255, 255, 255, .6);
  padding: 40px 54px;
  text-align: center;
  font: 400 9px/1.8 var(--sans); letter-spacing: .2em; text-transform: uppercase;
}
.site-footer a { color: rgba(255, 255, 255, .78); }

/* =========================================================================
   Responsive
   ========================================================================= */
@media (max-width: 1099px) {
  .section { padding: 60px 56px; }
  .invite { padding: 54px 56px; }
  .pagehead { padding: 56px 56px 44px; }
  .split { grid-template-columns: 1fr; gap: 40px; }
  .tiles { grid-template-columns: repeat(2, 1fr); gap: 30px; }
  .gallery { columns: 2; }
  .numbers { grid-template-columns: 1fr; gap: 30px; }
  .profiles { grid-template-columns: 1fr; gap: 36px; }
  .topbar .masthead { padding: 18px 28px; }
}

@media (max-width: 720px) {
  .section { padding: 48px 24px; }
  .invite { flex-direction: column; align-items: flex-start; gap: 24px; padding: 44px 24px; }
  .pagehead { padding: 44px 24px 34px; }
  .pagehead h1 { font-size: 32px; }

  /* Hero re-crops to a tall portrait rather than shrinking to a stripe */
  .hero { height: 88vh; min-height: 560px; }
  .hero .bg img { object-position: 62% 46%; }
  .hero .scrim {
    background: linear-gradient(180deg,
      rgba(104, 74, 50, .48) 0%,
      rgba(150, 112, 78, .06) 26%,
      rgba(74, 51, 34, .6) 66%,
      rgba(56, 38, 25, .9) 100%);
  }
  .hero .inner { padding: 16px 20px 26px; }
  .hero-copy h1 { font-size: 32px; line-height: 1.14; }
  .hero-copy .sub { font-size: 12px; }
  .hero-copy .buttons { flex-direction: column; align-self: stretch; gap: 9px; }
  .hero-copy .btn { width: 100%; padding: 15px 0; text-align: center; }

  /* Desktop nav collapses; a compact brand + menu link show instead */
  .masthead nav.desktop { display: none; }
  .masthead { grid-template-columns: 1fr auto; }
  .masthead .brandmark { align-items: flex-start; }

  .tiles { grid-template-columns: 1fr; gap: 28px; }
  .gallery { columns: 1; }
  .photo-cluster { height: 380px; }

  .btn { padding: 15px 26px; }        /* 44px min tap target */
  .topbar .masthead { padding: 14px 20px; }
  .topbar nav.desktop { display: none; }
}

/* Motion restraint */
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
  .photo:hover { transform: none; }
}
