/* ivoirespaces stylesheet
   Interface stays ivory-to-charcoal; colour comes from photography and three accent tones. */

:root {
  --paper: #F6F5F1;   /* ivory ground */
  --stone: #E6E4DE;   /* pale panels */
  --ash:   #B8B5AE;   /* rules, quiet text on dark */
  --smoke: #6F6C66;   /* secondary text */
  --ink:   #1C1B19;   /* primary text, dark sections */
  --rust:  #B5562F;   /* accents taken from the photography */
  --ochre: #C8973A;
  --sage:  #7C8C6A;

  --display: "Bodoni Moda", "Didot", "Bodoni 72", Georgia, serif;
  --body: "Jost", "Futura", "Avenir Next", system-ui, sans-serif;

  --gutter: clamp(1rem, 4vw, 3.5rem);
  --max: 1320px;
  --measure: 34em;
}

*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-weight: 350;
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }

:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}
.on-dark :focus-visible { outline-color: var(--paper); }

.skip-link {
  position: absolute; left: -999px; top: 0;
  background: var(--ink); color: var(--paper);
  padding: .75rem 1rem; z-index: 100;
}
.skip-link:focus { left: 1rem; top: 1rem; }

.wrap {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ---------- Type scale ---------- */
h1, h2, h3 {
  font-family: var(--display);
  font-weight: 400;
  line-height: 1.08;
  margin: 0;
  letter-spacing: -0.01em;
}
h2 { font-size: clamp(2rem, 4.6vw, 3.5rem); }
h3 { font-size: clamp(1.35rem, 2vw, 1.6rem); }
p { margin: 0 0 1em; max-width: var(--measure); }
.lede { font-size: clamp(1.15rem, 1.6vw, 1.35rem); line-height: 1.55; }
.muted { color: var(--smoke); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--stone);
}
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  height: 4.5rem;
}
.wordmark {
  font-family: var(--display);
  font-size: 1.5rem;
  text-decoration: none;
  letter-spacing: -0.01em;
}
.nav-toggle {
  display: none;
  background: none; border: 0; padding: .5rem;
  font: inherit; color: inherit; cursor: pointer;
}
.site-nav ul {
  display: flex; gap: 2.25rem;
  list-style: none; margin: 0; padding: 0;
}
.site-nav a {
  text-decoration: none;
  font-size: .95rem;
  padding-block: .35rem;
  border-bottom: 1px solid transparent;
}
.site-nav a:hover,
.site-nav a[aria-current="page"] { border-bottom-color: var(--ink); }

@media (max-width: 760px) {
  .nav-toggle { display: block; }
  .site-nav {
    position: absolute; inset: 4.5rem 0 auto 0;
    background: var(--paper);
    border-bottom: 1px solid var(--stone);
    display: none;
  }
  .site-nav.open { display: block; }
  .site-nav ul { flex-direction: column; gap: 0; padding: .5rem var(--gutter) 1.25rem; }
  .site-nav a { display: block; padding: .8rem 0; font-size: 1.15rem; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  font: 450 .95rem/1 var(--body);
  text-decoration: none;
  padding: 1.05rem 1.75rem;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--paper);
  cursor: pointer;
  transition: background .2s, color .2s;
}
.btn:hover { background: transparent; color: var(--ink); }
.btn.ghost { background: transparent; color: var(--ink); }
.btn.ghost:hover { background: var(--ink); color: var(--paper); }
.on-dark .btn { background: var(--paper); color: var(--ink); border-color: var(--paper); }
.on-dark .btn:hover { background: transparent; color: var(--paper); }

/* ---------- Hero ---------- */
.hero { padding-block: clamp(2rem, 5vw, 4rem) clamp(3rem, 7vw, 6rem); overflow: hidden; }
.hero .wrap {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  align-items: end;
  column-gap: 1.5rem;
}
.hero-mark {
  grid-column: 1 / -1;
  grid-row: 1;
  font-size: clamp(4.2rem, 17.5vw, 15.5rem);
  line-height: .86;
  letter-spacing: -0.035em;
  position: relative; z-index: 2;
  mix-blend-mode: multiply;
}
.hero-mark span { display: block; }
.hero-mark span:last-child { padding-left: 18%; }

.hero-figure {
  grid-column: 8 / -1;
  grid-row: 1;
  margin: 0;
  align-self: start;
  position: relative; z-index: 1;
  aspect-ratio: 3 / 4;
  background: var(--stone);
  border-radius: 999px 999px 0 0;   /* the arch */
  overflow: hidden;
  animation: rise 1.4s cubic-bezier(.2,.7,.1,1) both .15s;
}
.hero-figure img { width: 100%; height: 100%; object-fit: cover; }

.hero-copy {
  grid-column: 1 / 7;
  grid-row: 2;
  margin-top: clamp(1.5rem, 4vw, 3rem);
}
.hero-copy .btn { margin-top: .75rem; }

@keyframes rise {
  from { clip-path: inset(100% 0 0 0); }
  to   { clip-path: inset(0 0 0 0); }
}

@media (max-width: 760px) {
  .hero-figure { grid-column: 4 / -1; aspect-ratio: 4 / 5; }
  .hero-mark span:last-child { padding-left: 8%; }
  .hero-copy { grid-column: 1 / -1; }
}

/* ---------- Sections ---------- */
.section { padding-block: clamp(4rem, 9vw, 8rem); }
.section-head {
  display: flex; justify-content: space-between; align-items: end;
  gap: 2rem; flex-wrap: wrap;
  margin-bottom: clamp(2rem, 4vw, 3.5rem);
}
.section-head p { margin: 0; }
.text-link { text-decoration: none; border-bottom: 1px solid currentColor; padding-bottom: 2px; }

.on-dark { background: var(--ink); color: var(--paper); }
.on-dark .muted { color: var(--ash); }
.tint { background: var(--stone); }

/* Tonal strip: the palette itself, as the brand idea */
.tones {
  display: grid;
  grid-template-columns: 5fr 7fr;
  gap: clamp(2rem, 6vw, 6rem);
  align-items: center;
}
.tone-strip { outline: 1px solid var(--ash); display: grid; grid-template-columns: repeat(8, 1fr); height: clamp(14rem, 30vw, 22rem); }
.tone-strip div { display: flex; align-items: flex-end; padding: .75rem; font-size: .8rem; }
.tone-strip div:nth-child(1) { background: var(--paper); border: 1px solid var(--stone); }
.tone-strip div:nth-child(2) { background: var(--stone); }
.tone-strip div:nth-child(3) { background: var(--ash); }
.tone-strip div:nth-child(4) { background: var(--smoke); color: var(--paper); }
.tone-strip div:nth-child(5) { background: var(--ink); color: var(--paper); }
.tone-strip div:nth-child(6) { background: var(--rust); color: var(--paper); }
.tone-strip div:nth-child(7) { background: var(--ochre); color: var(--ink); }
.tone-strip div:nth-child(8) { background: var(--sage); color: var(--paper); }
@media (max-width: 520px) { .tone-strip { grid-template-columns: repeat(4, 1fr); height: 18rem; } }
@media (max-width: 760px) { .tones { grid-template-columns: 1fr; } }

/* ---------- Work grid ---------- */
.work-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: clamp(1rem, 2.5vw, 2rem);
}
.project { margin: 0; text-decoration: none; display: block; }
.project .frame { overflow: hidden; background: var(--stone); }
.project img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; transition: transform .8s cubic-bezier(.2,.7,.1,1); }
.project:hover img { transform: scale(1.03); }
.project figcaption { padding-top: .85rem; }
.project .title { font-family: var(--display); font-size: 1.3rem; display: block; }
.project .meta { font-size: .9rem; color: var(--smoke); }

.work-grid .p1 { grid-column: 1 / 8; }
.work-grid .p2 { grid-column: 8 / -1; align-self: end; }
.work-grid .p2 img, .work-grid .tall img { aspect-ratio: 3 / 4; }
.work-grid .p3 { grid-column: 2 / 6; }
.work-grid .p4 { grid-column: 7 / -1; margin-top: clamp(2rem, 8vw, 7rem); }

@media (max-width: 760px) {
  .work-grid .p1, .work-grid .p2, .work-grid .p3, .work-grid .p4 { grid-column: 1 / -1; margin-top: 0; }
}

/* Portfolio page grid */
.filters { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 2.5rem; }
.filters button {
  font: inherit; font-size: .9rem;
  background: transparent; color: var(--ink);
  border: 1px solid var(--ash);
  padding: .55rem 1.1rem; border-radius: 999px; cursor: pointer;
}
.filters button[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr));
  gap: clamp(1.5rem, 3vw, 2.5rem);
}
.portfolio-grid .project[hidden] { display: none; }

/* ---------- Services list ---------- */
.service-list { border-top: 1px solid var(--ash); margin: 0; }
.service-list > div {
  display: grid;
  grid-template-columns: 5fr 7fr;
  gap: 2rem;
  padding-block: 1.75rem;
  border-bottom: 1px solid var(--ash);
}
.service-list dt { font-family: var(--display); font-size: clamp(1.35rem, 2.2vw, 1.8rem); }
.service-list dd { margin: 0; }
.service-list dd p { margin-bottom: .4em; }
.on-dark .service-list, .on-dark .service-list > div { border-color: #3a3936; }
@media (max-width: 760px) { .service-list > div { grid-template-columns: 1fr; gap: .5rem; } }

/* ---------- Process (a real sequence, so numbered) ---------- */
.steps {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: clamp(1.5rem, 3vw, 2.5rem);
  counter-reset: step;
}
.steps li { counter-increment: step; border-top: 1px solid var(--ink); padding-top: 1.25rem; }
.steps li::before {
  content: counter(step);
  font-family: var(--display);
  font-size: 3rem; line-height: 1;
  display: block; margin-bottom: 1rem;
}
.steps h3 { margin-bottom: .6rem; }
.steps p { font-size: .98rem; }
@media (max-width: 900px) { .steps { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .steps { grid-template-columns: 1fr; } }

/* ---------- Split layouts ---------- */
.split {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 6vw, 6rem); align-items: center;
}
.split figure { margin: 0; }
.split .arch { border-radius: 999px 999px 0 0; overflow: hidden; aspect-ratio: 3 / 4; background: var(--stone); }
.split .arch img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 760px) { .split { grid-template-columns: 1fr; } }

/* ---------- Page intro (inner pages) ---------- */
.page-intro { padding-block: clamp(3rem, 8vw, 7rem) clamp(2rem, 4vw, 3rem); }
.page-intro h1 { font-size: clamp(3rem, 9vw, 7.5rem); letter-spacing: -0.03em; margin-bottom: 1.5rem; }

/* ---------- CTA ---------- */
.cta { text-align: left; }
.cta h2 { font-size: clamp(2.4rem, 6.5vw, 5.5rem); max-width: 14ch; margin-bottom: 2rem; }

/* ---------- Contact form ---------- */
.contact-grid { display: grid; grid-template-columns: 7fr 4fr; gap: clamp(2rem, 6vw, 6rem); }
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; } }
.form { display: grid; gap: 1.5rem; }
.form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
@media (max-width: 600px) { .form .row { grid-template-columns: 1fr; } }
.field label { display: block; font-size: .9rem; margin-bottom: .4rem; }
.field input, .field select, .field textarea {
  width: 100%;
  font: inherit; color: var(--ink);
  background: transparent;
  border: 0; border-bottom: 1px solid var(--ash);
  padding: .6rem 0; border-radius: 0;
}
.field textarea { min-height: 8rem; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-bottom-color: var(--ink); }
.form-note { font-size: .9rem; color: var(--smoke); min-height: 1.4em; }
.details dt { font-size: .9rem; color: var(--smoke); }
.details dd { margin: 0 0 1.5rem; font-family: var(--display); font-size: 1.3rem; }

/* ---------- Footer ---------- */
.site-footer { padding-block: 4rem 2.5rem; font-size: .95rem; }
.site-footer .wrap { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 2rem; }
.site-footer .wordmark { font-size: 2.5rem; display: block; margin-bottom: .75rem; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: .45rem; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.site-footer .legal { max-width: none; grid-column: 1 / -1; border-top: 1px solid #3a3936; padding-top: 1.5rem; margin-top: 2rem; color: var(--ash); }
@media (max-width: 700px) { .site-footer .wrap { grid-template-columns: 1fr 1fr; } .site-footer .brand { grid-column: 1 / -1; } }

/* ---------- 404 ---------- */
.notfound { min-height: 70vh; display: grid; align-content: center; }
.notfound h1 { font-size: clamp(5rem, 22vw, 16rem); line-height: .9; letter-spacing: -0.04em; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
