/* Kitty Berkeley — Interior Architecture & Design
   Palette drawn from the wordmark (umber on ivory) and the studio moodboard
   (sage paint, plaster, linen). */

:root {
  --ivory: #F6F3ED;   /* logo background */
  --linen: #ECE6DB;
  --umber: #4A4335;   /* logo ink */
  --olive: #3B3529;
  --sage: #8C977F;
  --sage-deep: #5D684F;
  --plaster: #C9A58C;
  --muted: #6E6556;
  --rule: rgba(74, 66, 52, 0.22);

  --serif: "Alice", Georgia, "Times New Roman", serif;
  --sans: "Jost", "Helvetica Neue", Arial, sans-serif;

  --gutter: clamp(20px, 5vw, 64px);
  --max: 1200px;
  --measure: 36em;

  /* Background colour of the current section, used to trim Alice letters */
  --paper: var(--ivory);
  --hairline: 0.35px;

  /* Small tracked capitals for navigation, buttons and labels */
  --caps-size: 0.6875rem;
  --caps-track: 0.2em;

  color-scheme: light;
}

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

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

body {
  margin: 0;
  background: var(--ivory);
  color: var(--umber);
  font-family: var(--sans);
  font-size: 0.9375rem;
  line-height: 1.85;
  font-weight: 300;
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
}

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

/* Titles follow the logo: Alice in spaced capitals, kept light.
   Alice has a single weight, so a hairline stroke in the background colour
   trims each letter, the same engraved effect the logo artwork uses. */
h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 400;
  line-height: 1.5;
  margin: 0 0 0.8em;
  text-transform: uppercase;
  text-wrap: balance;
}
h1 { font-size: clamp(1.25rem, 2vw, 1.6rem); letter-spacing: 0.22em; }

/* Page titles open with the outlined diamond from the logo */
h1:not(.hero h1)::before {
  content: "";
  display: inline-block;
  width: 0.34em;
  height: 0.34em;
  margin: 0 0.85em 0 0.12em;
  border: 1px solid currentColor;
  transform: rotate(45deg);
  vertical-align: 0.22em;
}
h2 { font-size: clamp(1rem, 1.4vw, 1.2rem); letter-spacing: 0.2em; }
h3 { font-size: 0.8125rem; letter-spacing: 0.18em; }

h1, h2, h3, .lede, .contact-list a, .project-pager a {
  -webkit-text-stroke: var(--hairline) var(--paper);
}

p { margin: 0 0 1.2em; max-width: var(--measure); text-wrap: pretty; }

strong, b { font-weight: 400; }

a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.25em; }
a:hover { color: var(--sage-deep); }

:focus-visible {
  outline: 2px solid var(--sage-deep);
  outline-offset: 3px;
  border-radius: 2px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  background: var(--umber);
  color: var(--ivory);
  padding: 10px 16px;
  z-index: 100;
}
.skip-link:focus { top: 12px; }

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

.section { padding: clamp(64px, 10vw, 128px) 0; }
.section-tight { padding: clamp(40px, 6vw, 72px) 0; }
.section-linen { background: var(--linen); --paper: var(--linen); }

.lede {
  font-family: var(--serif);
  font-size: clamp(1.0625rem, 1.3vw, 1.1875rem);
  line-height: 1.75;
  letter-spacing: 0;
  color: var(--umber);
}
.muted { color: var(--muted); }

/* ---------- Header ---------- */

.site-header {
  border-bottom: 1px solid var(--rule);
  background: var(--ivory);
  position: relative;
  z-index: 20;
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 108px;
}

.wordmark { display: block; flex-shrink: 1; min-width: 0; }
/* Logo leads the header, sized to leave room for the full menu (about 420px) */
.wordmark img { width: clamp(300px, 36vw, 460px); height: auto; }
/* With the Menu button instead, the logo takes most of the header width */
@media (max-width: 820px) {
  .wordmark img { width: min(420px, calc(100vw - 2 * var(--gutter) - 104px)); }
}

.nav { display: flex; align-items: center; gap: clamp(22px, 3vw, 44px); }
.nav a,
.menu-toggle {
  font-family: var(--sans);
  font-size: var(--caps-size);
  font-weight: 400;
  letter-spacing: var(--caps-track);
  text-transform: uppercase;
}
.nav a {
  text-decoration: none;
  padding: 6px 0;
  border-bottom: 1px solid transparent;
}
.nav a:hover { color: var(--umber); border-bottom-color: var(--umber); }
.nav a[aria-current="page"] { border-bottom-color: var(--umber); }
.nav .nav-cta {
  border: 1px solid var(--umber);
  padding: 10px 20px;
}
.nav .nav-cta:hover { background: var(--umber); color: var(--ivory); }

.menu-toggle {
  display: none;
  color: var(--umber);
  background: none;
  border: 1px solid var(--umber);
  padding: 8px 16px;
  min-height: 44px;
  cursor: pointer;
}

@media (max-width: 820px) {
  .menu-toggle { display: inline-block; }
  .nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    padding: 16px var(--gutter) 28px;
    background: var(--ivory);
    border-bottom: 1px solid var(--rule);
  }
  .nav.is-open { display: flex; }
  .nav a { font-size: 0.75rem; padding: 12px 0; }
  .nav .nav-cta { margin-top: 12px; padding: 12px 22px; }
}

/* ---------- Buttons ---------- */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 12px 30px;
  background: var(--umber);
  color: var(--ivory);
  border: 1px solid var(--umber);
  font-size: var(--caps-size);
  font-weight: 400;
  letter-spacing: var(--caps-track);
  text-transform: uppercase;
  text-decoration: none;
  transition: background-color 0.2s ease, color 0.2s ease;
}
.button:hover { background: var(--olive); color: var(--ivory); }
.button-quiet { background: transparent; color: var(--umber); }
.button-quiet:hover { background: var(--umber); color: var(--ivory); }

.actions { display: flex; flex-wrap: wrap; gap: 14px 20px; align-items: center; margin-top: 32px; }

/* ---------- The arch: the site's signature frame ---------- */

.arch {
  border-radius: 1000px 1000px 0 0;
  overflow: hidden;
  outline: 1px solid var(--umber);
  outline-offset: 10px;
  margin: 11px; /* room for the outline ring */
}
.arch img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- Flourish divider (leaves and diamond from the logo) ---------- */

.flourish {
  display: block;
  width: min(340px, 90%);
  aspect-ratio: 280 / 23;
  margin: 0 auto;
  background: currentColor;
  -webkit-mask: var(--flourish) center / contain no-repeat;
  mask: var(--flourish) center / contain no-repeat;
  color: var(--umber);
  /* Inlined copy of images/flourish.svg so it also works when opened as a local file */
  --flourish: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='80 288 560 46'%3E%3Cdefs%3E%3Cpath id='leaf' d='M0 0C2.5-1.8 6-5 11-5C15.5-5 18-2.8 18 0C18 2.8 15.5 5 11 5C6 5 2.5 1.8 0 0Z'/%3E%3Cg id='end'%3E%3Cuse href='%23leaf' transform='matrix(-1 0 0 -1 100 311)'/%3E%3Cuse href='%23leaf' transform='matrix(-0.309 -0.951 0.951 -0.309 102.07 308.14)'/%3E%3Cuse href='%23leaf' transform='matrix(-0.309 0.951 -0.951 -0.309 102.07 313.85)'/%3E%3Cpath d='M119 306.5L123.5 311L119 315.5L114.5 311Z' fill='none' stroke='%23000' stroke-width='1.8'/%3E%3C/g%3E%3C/defs%3E%3Cuse href='%23end'/%3E%3Cuse href='%23end' transform='matrix(-1 0 0 1 720 0)'/%3E%3Cpath d='M123.5 311H596.5' stroke='%23000' stroke-width='1.5'/%3E%3C/svg%3E");
}

.flourish-left { margin: 4px 0 32px; }
/* A title above a left-aligned divider starts where the rule begins, just past the leaves and diamond
   (43.5 of the divider's 560 drawing units, i.e. 7.77% of its width) */
h2:has(+ .flourish-left) { padding-left: calc(min(340px, 90%) * 0.0777); }

/* ---------- Placeholders for photography still to come ---------- */

.placeholder {
  display: grid;
  place-items: center;
  text-align: center;
  padding: 24px;
  background:
    linear-gradient(135deg, rgba(140, 151, 127, 0.18), rgba(201, 165, 140, 0.22)),
    var(--linen);
  border: 1px dashed rgba(74, 66, 52, 0.4);
  color: var(--muted);
  font-size: var(--caps-size);
  letter-spacing: var(--caps-track);
  text-transform: uppercase;
}
.placeholder span { max-width: 22em; }

/* Colour blocks with the monogram's leaf ornament, standing in for project photographs */
.swatch {
  position: relative;
  display: block;
  width: 100%;
  background: var(--swatch);
}
.swatch::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--ivory);
  -webkit-mask: var(--ornament) center / clamp(52px, 20%, 104px) auto no-repeat;
  mask: var(--ornament) center / clamp(52px, 20%, 104px) auto no-repeat;
  /* Leaves, line and diamond traced from Kitty-Berkeley-monogram.pdf */
  --ornament: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='146 300 108 50'%3E%3Cdefs%3E%3Cpath id='l' d='M0 0C2.5-1.8 6-5 11-5C15.5-5 18-2.8 18 0C18 2.8 15.5 5 11 5C6 5 2.5 1.8 0 0Z'/%3E%3C/defs%3E%3Cuse href='%23l' transform='matrix(-1 0 0 -1 167 325)'/%3E%3Cuse href='%23l' transform='matrix(-0.309 -0.951 0.951 -0.309 169.07 322.14)'/%3E%3Cuse href='%23l' transform='matrix(-0.309 0.951 -0.951 -0.309 169.07 327.85)'/%3E%3Cuse href='%23l' transform='matrix(1 0 0 -1 233 325)'/%3E%3Cuse href='%23l' transform='matrix(0.309 -0.951 -0.951 -0.309 230.93 322.14)'/%3E%3Cuse href='%23l' transform='matrix(0.309 0.951 0.951 -0.309 230.93 327.85)'/%3E%3Cpath d='M173 325H195.5M204.5 325H227' stroke='%23000' stroke-width='1.2'/%3E%3Cpath d='M200 320.5L204.5 325L200 329.5L195.5 325Z' fill='none' stroke='%23000' stroke-width='1.4'/%3E%3C/svg%3E");
}
.swatch--umber { --swatch: #4A4438; }
.swatch--terracotta { --swatch: #A0725F; }
.swatch--sand { --swatch: #CBB8A6; }

/* Alice in a gentle slant, like the logo's tagline */
.coming-soon {
  font-family: var(--serif);
  font-style: italic;
  font-size: 0.875rem;
  letter-spacing: 0.04em;
  color: var(--muted);
}

/* ---------- Home: hero ---------- */

.hero { padding: clamp(48px, 8vw, 104px) 0 clamp(64px, 9vw, 120px); }
.hero .container {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: clamp(40px, 7vw, 112px);
  align-items: center;
}
.hero h1 { max-width: 22em; font-size: clamp(1.3rem, 2.2vw, 1.75rem); letter-spacing: 0.16em; line-height: 1.6; }
.hero-media .arch { aspect-ratio: 4 / 5.4; max-width: 440px; margin-left: auto; }
.hero-note { margin-top: 32px; font-size: 0.8125rem; color: var(--muted); }

@media (max-width: 820px) {
  .hero .container { grid-template-columns: 1fr; }
  .hero-media { order: -1; }
  .hero-media .arch { max-width: 300px; margin: 11px auto; }
}

/* The one orchestrated moment: the arch opens on load */
@media (prefers-reduced-motion: no-preference) {
  .hero-media .arch img {
    animation: arch-open 1.4s cubic-bezier(0.22, 0.61, 0.36, 1) both;
  }
  .hero-copy { animation: rise 1s 0.35s ease-out both; }
  @keyframes arch-open {
    from { clip-path: inset(100% 0 0 0); transform: scale(1.08); }
    to { clip-path: inset(0 0 0 0); transform: scale(1); }
  }
  @keyframes rise {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: none; }
  }
}

.caption { margin-top: 12px; font-size: 0.8125rem; line-height: 1.6; color: var(--muted); }

/* ---------- Project previews (home) ---------- */

.section-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px 32px;
  margin-bottom: clamp(32px, 4vw, 56px);
}
.section-head h2 { margin: 0; }
.section-head > a {
  font-size: var(--caps-size);
  font-weight: 400;
  letter-spacing: var(--caps-track);
  text-transform: uppercase;
}
.section-head > p { margin: 0; font-size: 0.8125rem; }

/* One even row of matching rectangles, the same shape as the Portfolio page */
.project-previews {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(36px, 4vw, 56px) clamp(20px, 2.5vw, 36px);
}
.preview { text-decoration: none; display: block; }
.preview .placeholder, .preview .swatch, .preview img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.preview h3 { margin: 20px 0 2px; }
.preview p { margin: 0; color: var(--muted); font-size: 0.8125rem; }
.preview:hover h3 { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.2em; }

@media (max-width: 900px) {
  .project-previews { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .project-previews { grid-template-columns: 1fr; }
}

/* ---------- Services list ---------- */

.service-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule); }
.service-list li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
  gap: 8px 48px;
  padding: 26px 0;
  align-items: baseline;
  border-bottom: 1px solid var(--rule);
}
.service-list h3 { margin: 0; }
.service-list p { margin: 0; }

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

/* ---------- Page intro ---------- */

.page-intro { padding: clamp(56px, 8vw, 104px) 0 clamp(32px, 5vw, 56px); }
.page-intro h1 { margin-bottom: 0.35em; }

/* ---------- Projects page ---------- */

/* Index: one photograph per project, each opening its own page */
.project-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(36px, 4vw, 56px) clamp(20px, 2.5vw, 36px);
  padding-bottom: clamp(64px, 9vw, 120px);
}
.project-card { display: block; text-decoration: none; }
.project-card .placeholder, .project-card .swatch,
.project-card img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.project-card img { transition: opacity 0.3s ease; }
.project-card:hover img { opacity: 0.88; }
.project-card h2 {
  margin: 20px 0 2px;
  font-size: 0.875rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  line-height: 1.5;
}
.project-card p { margin: 0; font-size: 0.8125rem; color: var(--muted); }
.project-card:hover h2 { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.3em; }

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

/* Project page */
.project-head { padding-bottom: clamp(28px, 4vw, 44px); }
.back-link {
  display: inline-block;
  margin-bottom: 20px;
  font-size: var(--caps-size);
  font-weight: 400;
  letter-spacing: var(--caps-track);
  text-transform: uppercase;
  text-decoration: none;
  color: var(--muted);
}
.back-link::before { content: "\2190\00a0\00a0"; }
.back-link:hover { color: var(--umber); }

.project-hero { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.project-intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr);
  gap: clamp(24px, 5vw, 80px);
  padding: clamp(40px, 6vw, 72px) 0;
}
.project-intro .project-facts { margin: 0; }
/* Until a description is written, the facts use the full width rather than a narrow column */
.project-intro--facts-only { grid-template-columns: minmax(0, 1fr); }
.project-intro--facts-only .project-facts { max-width: 46em; }
.project-photos {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(14px, 2vw, 28px);
  align-items: start;
}
.project-photos > * { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.project-photos > img[width][height] { aspect-ratio: auto; } /* real photos keep their own shape */
.project-pager {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding-top: clamp(48px, 7vw, 88px);
  padding-bottom: clamp(48px, 7vw, 88px);
}
.project-pager a { text-decoration: none; font-family: var(--serif); font-size: 1.0625rem; }
.project-pager a:last-child { text-align: right; }
.project-pager span {
  display: block;
  margin-bottom: 4px;
  font-family: var(--sans);
  font-size: var(--caps-size);
  letter-spacing: var(--caps-track);
  text-transform: uppercase;
  color: var(--muted);
}
.project-pager a:hover { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.3em; }

@media (max-width: 700px) {
  .project-intro { grid-template-columns: 1fr; }
  .project-photos { grid-template-columns: 1fr; }
}

.project-facts { display: grid; grid-template-columns: auto 1fr; gap: 6px 24px; margin: 20px 0 24px; font-size: 0.875rem; align-items: baseline; }
.project-facts dt {
  color: var(--muted);
  font-size: var(--caps-size);
  letter-spacing: var(--caps-track);
  text-transform: uppercase;
}
.project-facts dd { margin: 0; }
.todo {
  border: 1px dashed rgba(74, 66, 52, 0.4);
  padding: 12px 16px;
  font-size: 0.8125rem;
  line-height: 1.7;
  color: var(--muted);
  background: rgba(238, 232, 221, 0.6);
}

/* ---------- About page ---------- */

.about {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: clamp(40px, 7vw, 112px);
  align-items: start;
}
.about .arch { aspect-ratio: 4 / 5.2; max-width: 420px; }
.about .arch .placeholder { height: 100%; border: 0; }

.materials {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(14px, 2vw, 28px);
}
.materials figure { margin: 0; }
.materials img { aspect-ratio: 4 / 5; object-fit: cover; width: 100%; }

@media (max-width: 820px) {
  .about { grid-template-columns: 1fr; }
  .about .arch { max-width: 300px; margin: 11px auto; }
}
@media (max-width: 900px) {
  .materials { grid-template-columns: 1fr 1fr; }
}

/* ---------- Services page ---------- */

.service-detail {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr);
  gap: clamp(24px, 5vw, 80px);
  padding: clamp(40px, 6vw, 72px) 0;
  border-top: 1px solid var(--rule);
}
.services-block { padding-bottom: clamp(24px, 4vw, 48px); }
.services-block .service-detail:first-child { border-top: 0; }
.service-detail ul { margin: 0; padding-left: 1.1em; }
.service-detail li { margin-bottom: 6px; }
.service-detail li::marker { color: var(--sage-deep); }

.steps { list-style: none; counter-reset: step; margin: 0; padding: 0; display: grid; gap: 0; }
.steps li {
  counter-increment: step;
  display: grid;
  grid-template-columns: 3.5rem minmax(0, 1fr);
  gap: 8px 20px;
  padding: 26px 0;
  border-bottom: 1px solid var(--rule);
}
.steps li::before {
  content: counter(step);
  font-family: var(--serif);
  font-size: 1.5rem;
  line-height: 1;
  color: var(--sage-deep);
}
.steps h3 { margin: 0 0 6px; }
.steps p { margin: 0; }

.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(32px, 6vw, 96px);
}
.contact-list { list-style: none; padding: 0; margin: 0; }
.contact-list li { padding: 16px 0; border-bottom: 1px solid var(--rule); }
.contact-list .label {
  display: block;
  margin-bottom: 4px;
  font-size: var(--caps-size);
  letter-spacing: var(--caps-track);
  text-transform: uppercase;
  color: var(--muted);
}
.contact-list a { font-family: var(--serif); font-size: clamp(1.0625rem, 1.5vw, 1.25rem); text-decoration: none; }
.contact-list a:hover { text-decoration: underline; }
.contact-list .todo { display: inline-block; margin-top: 6px; }

@media (max-width: 820px) {
  .service-detail, .contact-grid { grid-template-columns: 1fr; }
}

/* ---------- Footer ---------- */

/* Dark umber, the monogram's own background, so the circle sits on it seamlessly */
.site-footer {
  background: var(--umber);
  color: var(--ivory);
  padding: clamp(56px, 8vw, 88px) 0 40px;
  font-size: 0.95rem;
  text-align: center;
}
.site-footer .container { display: flex; flex-direction: column; align-items: center; gap: 28px; }
.footer-monogram { width: clamp(150px, 18vw, 190px); height: auto; }
.footer-nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 32px; }
.footer-nav a {
  text-decoration: none;
  color: var(--ivory);
  font-size: var(--caps-size);
  font-weight: 400;
  letter-spacing: var(--caps-track);
  text-transform: uppercase;
}
.footer-nav a:hover { color: var(--ivory); text-decoration: underline; }
.site-footer a:focus-visible { outline-color: var(--linen); }
.footer-small { color: #CFC7B8; font-size: 0.6875rem; letter-spacing: 0.08em; margin: 0; max-width: none; }
