/* ------------------------------------------------------------------
   A Place for Poppy — "the portfolio"
   Print logic, not app logic: one book face (Caslon) and one label face
   (typewriter), hairline ledger rules, square corners, no shadows, no
   scroll animation. Grounds are her paints: Bancha, Hague Blue, chalk.
   ------------------------------------------------------------------ */
:root {
  --paper:      #EFEAE0;
  --paper-deep: #E5DED0;
  --ink:        #211D19;
  --ink-soft:   #5A534A;
  --ink-faint:  #8C8479;
  --rule:       #211D19;
  --olive:      #5C6843;
  --olive-deep: #414B2F;
  --hague:      #3E5566;
  --pink:       #B08C86;
  --poppy:      #C8442A;
  --brass:      #A88A4F;

  --book: "Libre Caslon Text", "Iowan Old Style", "Palatino", Georgia, serif;
  --type: "Courier Prime", "Courier New", Courier, monospace;

  --page-w: 1320px;
  --gutter: clamp(16px, 3.5vw, 40px);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
/* Nav links glide down the page so it reads as one page; land sections clear of the sticky masthead */
section[id] { scroll-margin-top: 72px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--book);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; height: auto; }
a { color: inherit; text-decoration: none; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3 { margin: 0; font-weight: 400; line-height: 1.08; letter-spacing: -.005em; }
p { margin: 0 0 1em; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }

.page { max-width: var(--page-w); margin: 0 auto; padding-inline: var(--gutter); }
.mono { font-family: var(--type); font-size: .82rem; letter-spacing: .01em; line-height: 1.5; }

h1 { font-size: clamp(2.3rem, 5.2vw, 4.4rem); }
h2 { font-size: clamp(1.9rem, 3.4vw, 2.9rem); }
h3 { font-size: 1.45rem; }

/* Section head: a rule, then "§ n" and a running title */
.sec {
  display: flex; justify-content: space-between; align-items: baseline;
  border-top: 1px solid var(--rule); padding-top: 10px; margin-bottom: clamp(24px, 3vw, 40px);
}
.sec__title { font-variant: small-caps; letter-spacing: .08em; font-size: 1.05rem; }
.sec--light { border-top-color: currentColor; }

/* Buttons & links: rectangles and underlines, nothing rounded */
.btn {
  display: inline-block; font-family: var(--type); font-size: .82rem; letter-spacing: .08em; text-transform: uppercase;
  border: 1px solid var(--ink); padding: 12px 18px; background: var(--ink); color: var(--paper);
}
.btn:hover { background: var(--poppy); border-color: var(--poppy); }
.btn--light { background: transparent; color: inherit; border-color: currentColor; }
.btn--light:hover { background: var(--paper); color: var(--ink); border-color: var(--paper); }
.textlink { border-bottom: 1px solid var(--ink); padding-bottom: 1px; font-style: italic; }
.textlink:hover { color: var(--poppy); border-color: var(--poppy); }

/* ---------------- Masthead ---------------- */
.mast { border-bottom: 1px solid var(--rule); position: sticky; top: 0; z-index: 30; background: var(--paper); }
.mast::after { content: ""; display: block; border-top: 1px solid var(--rule); margin-top: 3px; }
.mast__row { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; height: 60px; gap: 24px; }
.wordmark { display: inline-flex; align-items: center; gap: 10px; font-size: 1.2rem; white-space: nowrap; }
.wordmark__mark { width: 22px; height: 22px; color: var(--poppy); }
.mast__nav { display: flex; gap: 26px; font-family: var(--type); font-size: .8rem; letter-spacing: .1em; text-transform: uppercase; }
.mast__nav a { padding: 4px 0; border-bottom: 1px solid transparent; }
.mast__nav a:hover { border-bottom-color: var(--ink); }
.mast__place { margin: 0; justify-self: end; font-style: italic; font-size: .95rem; color: var(--ink-soft); }
.mast__menu { display: none; font-family: var(--type); font-size: .8rem; letter-spacing: .1em; text-transform: uppercase; justify-self: end; border-bottom: 1px solid var(--ink); }

/* ---------------- Hero ---------------- */
.hero { display: grid; grid-template-columns: 6fr 6fr; gap: clamp(28px, 5vw, 72px); align-items: center; padding-block: clamp(36px, 6vw, 80px) clamp(56px, 6vw, 84px); }
/* The caption hangs below the plate so the copy centres on the picture itself, not picture + caption */
.hero__plate { position: relative; }
.hero__plate figcaption { position: absolute; top: 100%; left: 0; right: 0; }
.hero__copy .mono { color: var(--ink-soft); margin-bottom: 26px; }
.hero h1 { margin-bottom: 26px; }
.hero__lede { font-size: 1.2rem; max-width: 42ch; color: var(--ink-soft); }
.hero__actions { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; margin-top: 30px; }

.plate { margin: 0; }
.plate img { width: 100%; border: 1px solid var(--ink); background: #fff; }
.plate figcaption { margin-top: 10px; color: var(--ink-soft); }
.hero__plate img { aspect-ratio: 4 / 5; object-fit: cover; }

/* Photographs get a shaped mount: a fanlight arch for the house, a cameo for Molly.
   Boards stay square. The mount is a padded wrapper with its own hairline, so the
   two lines stay concentric in every browser. */
.mount { display: block; padding: 9px; border: 1px solid var(--ink); }
.plate--arch .mount { border-radius: 999px 999px 0 0; }
.plate--arch img { border-radius: 999px 999px 0 0; }
.plate--cameo .mount { border-radius: 50%; }
.plate--cameo img { border-radius: 50%; aspect-ratio: 4 / 5; object-fit: cover; }
.plate--arch figcaption, .plate--cameo figcaption { margin-top: 14px; text-align: center; }

/* ---------------- Paint card ---------------- */
.card { border-top: 1px solid var(--rule); padding-block: 18px 26px; margin-bottom: 0; }
.card__note { color: var(--ink-soft); margin-bottom: 14px; }
.chips { display: grid; grid-template-columns: repeat(8, 1fr); gap: 14px; }
.chips li { display: grid; gap: 6px; }
.chip { display: block; height: 58px; background: var(--c); border: 1px solid rgba(33,29,25,.25); }
.chip__name { font-size: .95rem; line-height: 1.2; }
.chips .mono { color: var(--ink-faint); font-size: .72rem; }

/* ---------------- Portfolio ---------------- */
.book { background: #F7F4EC; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); padding-block: clamp(40px, 6vw, 80px); }
.book__head { display: grid; grid-template-columns: 6fr 6fr; gap: clamp(24px, 5vw, 80px); align-items: end; margin-bottom: clamp(24px, 4vw, 48px); }
.book__intro { margin: 0; color: var(--ink-soft); }

.ctl { border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); margin-bottom: 28px; }
.ctl__row { display: grid; grid-template-columns: 96px 1fr; align-items: baseline; gap: 16px; padding: 10px 0; border-bottom: 1px dotted rgba(33,29,25,.35); }
.ctl__row:last-of-type { border-bottom: 0; }
.ctl__label { color: var(--ink-soft); }
.ctl__opts { display: flex; flex-wrap: wrap; gap: 6px 22px; }
.ctl__opts button { font-family: var(--book); font-size: 1rem; padding: 2px 0; border-bottom: 1px solid transparent; }
.ctl__opts button:hover { border-bottom-color: var(--ink); }
.ctl__opts button.is-on { border-bottom-color: var(--ink); }
.ctl__opts--chips button { display: inline-flex; align-items: center; gap: 8px; }
.ctl__opts--chips i { width: 14px; height: 14px; background: var(--c); border: 1px solid rgba(33,29,25,.35); }
.ctl__count { padding: 10px 0 8px; color: var(--ink-faint); margin: 0; border-top: 1px solid var(--rule); }

.group { margin-bottom: 30px; }
.group__head { display: flex; align-items: baseline; gap: 12px; font-weight: 400; border-bottom: 1px solid var(--rule); padding-bottom: 8px; margin: 0 0 22px; }
.group__head i { align-self: center; width: 14px; height: 14px; background: var(--c); border: 1px solid rgba(33,29,25,.35); }
.group__head > span:first-of-type { font-family: var(--book); font-variant: small-caps; letter-spacing: .08em; font-size: 1.1rem; }
.group__sub { color: var(--ink-faint); }
.group__n { margin-left: auto; color: var(--ink-faint); }
.grid { columns: 3; column-gap: 28px; }
.item { break-inside: avoid; margin-bottom: 34px; }
.item__img { position: relative; display: block; width: 100%; border: 1px solid var(--ink); background: #fff; cursor: zoom-in; }
.item__img img { width: 100%; transition: opacity .25s; }
.item__img img.is-swapping { opacity: 0; }
.item__cap { display: flex; justify-content: space-between; gap: 12px; margin-top: 9px; color: var(--ink-soft); }
.item__title { font-style: italic; font-size: 1.05rem; margin: 2px 0 0; }
.swatches { display: flex; gap: 4px; margin-top: 8px; }
.swatches i { width: 14px; height: 14px; border: 1px solid rgba(33,29,25,.25); background: var(--c); }
.variants { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 10px; }
.variants button { font-family: var(--type); font-size: .78rem; letter-spacing: .02em; border-bottom: 1px solid transparent; color: var(--ink-soft); }
.variants button.is-on { color: var(--ink); border-bottom-color: var(--ink); }
.variants button:hover { color: var(--poppy); }
.variants .variants__label { color: var(--ink-faint); font-size: .78rem; font-family: var(--type); }
.flip { border: 1px solid var(--ink) !important; padding: 3px 8px !important; }
.flip.is-on { background: var(--ink); color: var(--paper) !important; }
.item__pin { position: absolute; top: -1px; right: -1px; font-family: var(--type); font-size: .7rem; letter-spacing: .08em; text-transform: uppercase; background: var(--poppy); color: #fff; padding: 4px 8px; }

/* ---------------- Services ("contents") ---------------- */
.services { padding-block: clamp(48px, 7vw, 96px); }
.services h2 { margin-bottom: 28px; }
.toc { border-top: 1px solid var(--rule); }
.toc li { display: grid; grid-template-columns: 60px 1fr auto; gap: 24px; align-items: start; padding: 26px 0; border-bottom: 1px solid var(--rule); }
.toc__num { padding-top: 6px; color: var(--ink-soft); }
.toc__body h3 { margin-bottom: 8px; }
.toc__body p { max-width: 62ch; color: var(--ink-soft); }
.toc__fit { color: var(--ink-faint); margin: 0; }
.toc__link { font-family: var(--type); font-size: .82rem; letter-spacing: .08em; text-transform: uppercase; border-bottom: 1px solid var(--ink); padding-top: 8px; }
.toc__link:hover { color: var(--poppy); border-color: var(--poppy); }
.services__note { margin: 18px 0 0; font-style: italic; color: var(--ink-soft); }

/* ---------------- Process (olive ground) ---------------- */
.process { background: var(--olive); color: #EEEBE1; padding-block: clamp(40px, 6vw, 80px); }
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; }
.steps li { border-top: 1px solid rgba(238,235,225,.5); padding-top: 14px; }
.steps .mono { display: block; color: #C9C7B4; margin-bottom: 10px; }
.steps h3 { font-size: 1.3rem; margin-bottom: 8px; }
.steps p { margin: 0; color: #D6D3C4; font-size: .98rem; }

/* ---------------- About ---------------- */
.about { padding-block: clamp(48px, 7vw, 96px); }
.about__grid { display: grid; grid-template-columns: 5fr 7fr; gap: clamp(28px, 5vw, 80px); align-items: start; }
.about__copy h2 { margin-bottom: 20px; }
.about__copy p { color: var(--ink-soft); max-width: 60ch; }
.dropcap::first-letter { float: left; font-size: 3.6em; line-height: .8; padding: 6px 8px 0 0; color: var(--ink); }
.margin-note { border-left: 2px solid var(--poppy); padding-left: 16px; margin-top: 28px; }
.margin-note .mono { color: var(--ink-soft); margin-bottom: 6px; }
.margin-note p:last-child { margin: 0; }

/* ---------------- Enquire (Hague Blue ground) ---------------- */
.enquire { background: var(--hague); color: #E8E7DF; padding-block: clamp(48px, 7vw, 96px); }
.enquire__grid { display: grid; grid-template-columns: 5fr 7fr; gap: clamp(28px, 5vw, 80px); align-items: start; }
.enquire__copy h2 { margin-bottom: 14px; }
.enquire__copy p { color: #C9CCC6; }
.enquire__copy a { border-bottom: 1px solid currentColor; }
.form { display: grid; grid-template-columns: 1fr 1fr; gap: 22px 28px; }
.form label { display: grid; gap: 6px; }
.form .mono { color: #B9BDB6; }
.form input, .form select, .form textarea {
  font: inherit; color: inherit; background: transparent; border: 0; border-bottom: 1px solid #B9BDB6; padding: 6px 0; border-radius: 0; width: 100%;
}
.form select { appearance: none; -webkit-appearance: none; }
.form select option { color: var(--ink); }
.form textarea { resize: vertical; }
.form input:focus, .form select:focus, .form textarea:focus { outline: none; border-bottom-color: #fff; }
.form__wide { grid-column: 1 / -1; }
.form__foot { grid-column: 1 / -1; display: flex; align-items: center; gap: 18px; }
.form__status { color: #C9CCC6; }

/* ---------------- Footer ---------------- */
.foot { background: var(--ink); color: #D8D3C7; padding-block: 30px; }
.foot__row { display: flex; justify-content: space-between; align-items: center; gap: 18px; flex-wrap: wrap; }
.foot .mono { margin: 0; color: #A39C90; }
.foot a { border-bottom: 1px solid transparent; }
.foot a:hover { border-bottom-color: currentColor; }
.wordmark--light .wordmark__mark { color: var(--poppy); }

/* ---------------- Lightbox ---------------- */
.lb { position: fixed; inset: 0; z-index: 100; }
.lb__scrim { position: absolute; inset: 0; background: rgba(33,29,25,.8); }
.lb__panel { position: absolute; inset: 24px; background: var(--paper); border: 1px solid var(--ink); display: grid; grid-template-rows: minmax(0, 1fr) auto; overflow: hidden; }
.lb__close { position: absolute; top: 10px; right: 14px; z-index: 2; letter-spacing: .1em; text-transform: uppercase; border-bottom: 1px solid var(--ink); }
.lb__stage { position: relative; display: flex; align-items: center; justify-content: center; padding: 48px 64px 12px; min-height: 0; overflow: hidden; }
.lb__stage img { display: block; width: auto; height: auto; max-width: 100%; max-height: 100%; border: 1px solid var(--ink); background: #fff; object-fit: contain; }
@supports not (height: 1dvh) { .lb__stage img { max-height: calc(100vh - 200px); } }
.lb__arrow { position: absolute; top: 50%; transform: translateY(-50%); font-size: 2rem; width: 44px; height: 44px; }
.lb__arrow--prev { left: 12px; } .lb__arrow--next { right: 12px; }
.lb__meta { border-top: 1px solid var(--rule); padding: 12px 20px 14px; display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.lb__meta .mono { margin: 0; }
.lb__meta .swatches, .lb__meta .variants { margin: 0; }

/* ---------------- Responsive ---------------- */
@media (max-width: 1000px) {
  .chips { grid-template-columns: repeat(4, 1fr); }
  .grid { columns: 2; }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .mast__row { grid-template-columns: 1fr auto; }
  .mast__nav { display: none; grid-column: 1 / -1; flex-direction: column; gap: 0; padding: 8px 0 14px; }
  .mast__nav a { padding: 10px 0; border-bottom: 1px dotted rgba(33,29,25,.35); }
  .mast.is-open .mast__nav { display: flex; }
  .mast.is-open .mast__row { height: auto; padding-top: 14px; }
  .mast__place { display: none; }
  .mast__menu { display: block; }
}
@media (max-width: 760px) {
  body { font-size: 16px; }
  .hero, .note__grid, .book__head, .about__grid, .enquire__grid { grid-template-columns: 1fr; }
  .hero__plate { order: -1; }
  .hero__plate img { aspect-ratio: 4 / 3; }
  .hero__plate figcaption { position: static; margin-bottom: 22px; }
  .chips { grid-template-columns: repeat(2, 1fr); }
  .ctl__row { grid-template-columns: 1fr; gap: 6px; }
  .toc li { grid-template-columns: 44px 1fr; }
  .toc__link { grid-column: 2; padding-top: 0; }
  .form { grid-template-columns: 1fr; }
  .lb__panel { inset: 10px; }
  .lb__stage { padding: 44px 12px 10px; }
  .lb__arrow { display: none; }
  .lb__meta { padding: 10px 14px 12px; gap: 10px 16px; max-height: 38vh; overflow: auto; }
}
@media (max-width: 560px) {
  .grid { columns: 1; }
  .steps { grid-template-columns: 1fr; }
}
