/* Kyoto Archive landing page. Mobile first, system fonts, no animation beyond a hover. */

:root {
  --bg: #f4f1eb;
  --bg-deep: #ece8e0;
  --wall: #e3ded4;
  --ink: #1c1b19;
  --ink-soft: #55524c;
  --ink-mute: #8a867e;
  --line: #d9d4ca;
  --frame: #171614;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Arial, sans-serif;
  --gutter: 20px;
  --measure: 34rem;
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.55;
}

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

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 400;
  letter-spacing: -0.005em;
  margin: 0;
}

h2 { font-size: 1.75rem; line-height: 1.2; }
h3 { font-size: 1.2rem; line-height: 1.3; }

p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

a { color: inherit; }

section { padding: 3.5rem var(--gutter); scroll-margin-top: 64px; }

.section-head { max-width: var(--measure); margin-bottom: 2rem; }
.section-head p { color: var(--ink-soft); margin-top: 0.75rem; }

/* Buttons */

.btn {
  display: inline-block;
  padding: 0.85rem 1.4rem;
  font: inherit;
  font-size: 0.95rem;
  text-decoration: none;
  border: 1px solid var(--ink);
  border-radius: 2px;
  line-height: 1.2;
  cursor: pointer;
}
.btn-primary { background: var(--ink); color: var(--bg); }
.btn-primary:hover { background: #000; }
.btn-secondary { background: transparent; color: var(--ink); }
.btn-secondary:hover { background: var(--bg-deep); }
.cta-row { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.75rem; }

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem var(--gutter);
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
}
.wordmark {
  font-family: var(--serif);
  font-size: 1.15rem;
  letter-spacing: 0.02em;
  text-decoration: none;
  margin: 0;
  white-space: nowrap;
}
.site-header nav { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 0.35rem 0.9rem; font-size: 0.82rem; }
.site-header nav .nav-about { display: none; }
.site-header nav a { text-decoration: none; color: var(--ink-soft); white-space: nowrap; }
.site-header nav a:hover { color: var(--ink); }

/* Hero */

.hero {
  display: grid;
  gap: 2rem;
  padding-top: 2.5rem;
  padding-bottom: 3rem;
}
.hero h1 {
  font-size: clamp(2rem, 6vw, 3.1rem);
  line-height: 1.12;
  margin-bottom: 1.25rem;
}
.hero-text p { max-width: var(--measure); color: var(--ink-soft); font-size: 1.05rem; }
/* The hero is the artwork in a simple CSS frame on a neutral panel, like the wall mockups.
   Two layers sit on the panel; site.js crossfades framed works between them. */
.hero-art {
  background: var(--hero-bg, var(--bg-deep));
  border-radius: 2px;
  position: relative;
  order: -1;
  aspect-ratio: 1 / 1;
}
.hero-layer {
  position: absolute;
  inset: 9%;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 1.2s ease;
}
.hero-layer.is-visible { opacity: 1; }
.hero-frame {
  box-sizing: border-box;
  height: 100%;
  max-width: 100%;
  width: fit-content;
  background: #fff;
  border: 5px solid var(--frame);
  padding: clamp(8px, 2vw, 22px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.16), 0 2px 5px rgba(0, 0, 0, 0.1);
}
.hero-frame img { height: 100%; width: auto; max-width: 100%; object-fit: contain; }
.hero-note {
  position: absolute;
  left: 4%;
  bottom: 3%;
  margin: 0;
  font-size: 0.7rem;
  color: var(--ink-mute);
}

/* Works grid */

.collection { background: var(--bg); border-top: 1px solid var(--line); }
/* Column layout so each tile keeps the artwork's own proportions. */
.works-grid {
  columns: 2;
  column-gap: 1rem;
}
.work {
  margin: 0 0 1.75rem;
  break-inside: avoid;
}
.work-img {
  background: #faf9f7;
  padding: 9%;
}
.work-img img {
  width: 100%;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
  transition: transform 0.25s ease;
}
.work:hover .work-img img { transform: scale(1.015); }
.work figcaption { margin-top: 0.7rem; font-size: 0.85rem; line-height: 1.4; }
.work-title { display: block; }
.work-meta { display: block; color: var(--ink-mute); }

/* How it works */

.how { background: var(--bg-deep); }
.how h2 { margin-bottom: 2rem; }
.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1.75rem;
}
.steps li { max-width: 26rem; }
.step-num { display: block; font-size: 0.8rem; color: var(--ink-mute); margin-bottom: 0.4rem; letter-spacing: 0.05em; }
.steps h3 { margin-bottom: 0.4rem; }
.steps p { color: var(--ink-soft); }

/* Offer: starting price and what the service covers */

.offer { border-bottom: 1px solid var(--line); }
.offer h2 { margin-bottom: 1.25rem; }
.offer-text { max-width: var(--measure); color: var(--ink-soft); font-size: 1.05rem; }
.offer-price {
  font-family: var(--serif);
  font-size: clamp(1.45rem, 2.4vw, 1.9rem);
  line-height: 1.3;
  max-width: 30rem;
  margin: 2.25rem 0 0.5rem;
}
.offer-note { color: var(--ink-mute); font-size: 0.9rem; margin-bottom: 1.75rem; }

/* Wall examples */

.wall-figure { margin: 0 0 2.5rem; }
.wall-figure:last-child { margin-bottom: 0; }
.wall {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5%;
  padding: 10% 6%;
  background: var(--wall);
  background-image: linear-gradient(180deg, rgba(255, 255, 255, 0.25), rgba(0, 0, 0, 0.04));
  border-radius: 2px;
}
.frame {
  flex: 0 0 var(--w);
  width: var(--w);
  background: #fff;
  border: 0.45vw solid var(--frame);
  /* percentage padding resolves against the wall, so scale it by the frame's own share */
  padding: calc(var(--w) * 0.07);
  box-shadow: 0 1.2vw 2.4vw rgba(0, 0, 0, 0.16), 0 0.2vw 0.4vw rgba(0, 0, 0, 0.1);
}
.frame img { width: 100%; }
.wall-figure figcaption { margin-top: 0.7rem; font-size: 0.8rem; color: var(--ink-mute); }

/* About */

.about { border-top: 1px solid var(--line); }
.about h2 { margin-bottom: 1.25rem; }
.about-text { max-width: var(--measure); color: var(--ink-soft); font-size: 1.05rem; }

/* Who */

.who { padding-top: 0; }
.who h2 { font-size: 1.05rem; font-family: var(--sans); color: var(--ink-mute); margin-bottom: 0.75rem; }
.who-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  font-family: var(--serif);
  font-size: 1.3rem;
}

/* Enquiry */

.enquiry { background: var(--bg-deep); border-top: 1px solid var(--line); }
.enquiry-intro { max-width: var(--measure); margin-bottom: 2rem; }
.enquiry-intro h2 { margin-bottom: 1rem; }
.enquiry-intro p { color: var(--ink-soft); }
.enquiry-form { display: grid; gap: 1.1rem; max-width: 46rem; }
.field { display: grid; gap: 0.35rem; }
.field label { font-size: 0.85rem; color: var(--ink-soft); }
.optional { color: var(--ink-mute); }
.field input, .field select, .field textarea {
  font: inherit;
  font-size: 1rem;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 2px;
  padding: 0.7rem 0.8rem;
  width: 100%;
}
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--ink); outline-offset: 1px; border-color: var(--ink); }
.field textarea { resize: vertical; }
.form-note { font-size: 0.85rem; color: var(--ink-mute); margin: 0; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; }
.form-status { margin: 0; font-size: 0.9rem; color: var(--ink-soft); }
.form-status[data-state="error"] { color: #8a2d1f; }
.form-status[data-state="ok"] { color: var(--ink); }
.form-unavailable .btn { opacity: 0.5; pointer-events: none; }
.form-unavailable .form-status { max-width: 30rem; }

/* Footer */

.site-footer {
  padding: 2.5rem var(--gutter) 3rem;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 1.25rem;
  font-size: 0.9rem;
  color: var(--ink-soft);
}
.site-footer .wordmark { color: var(--ink); margin-bottom: 0.25rem; }
.footer-links { display: flex; gap: 1.25rem; }
.footer-links a { text-decoration: none; }
.footer-links a:hover { text-decoration: underline; }
.copyright { color: var(--ink-mute); margin: 0; }

/* Privacy page */

.prose { max-width: var(--measure); padding: 3rem var(--gutter) 4rem; color: var(--ink-soft); }
.prose h1 { font-size: 2rem; margin-bottom: 1.5rem; color: var(--ink); }
.prose h2 { font-size: 1.2rem; margin: 2rem 0 0.5rem; color: var(--ink); }

/* Larger screens */

@media (min-width: 640px) {
  :root { --gutter: 32px; }
  .site-header nav .nav-about { display: inline; }
  .steps { grid-template-columns: repeat(3, 1fr); gap: 2rem; }
  .site-footer { grid-template-columns: 1fr auto; align-items: end; }
  .site-footer .copyright { grid-column: 1 / -1; }
  .enquiry-form { grid-template-columns: 1fr 1fr; }
  .field-wide { grid-column: 1 / -1; }
}

@media (min-width: 900px) {
  :root { --gutter: 48px; }
  section { padding: 5rem var(--gutter); }
  .hero {
    grid-template-columns: 5fr 7fr;
    align-items: center;
    gap: 3.5rem;
    min-height: min(calc(100vh - 60px), 820px);
    padding-top: 2rem;
    padding-bottom: 3rem;
  }
  .hero-art { order: 0; }
  .hero-text { padding-bottom: 2rem; }
  .works-grid { columns: 3; column-gap: 2rem; }
  .work { margin-bottom: 3rem; }
  .who-list { font-size: 1.5rem; gap: 0.5rem 2.25rem; }
  .enquiry { display: grid; grid-template-columns: 4fr 7fr; gap: 4rem; align-items: start; }
  .enquiry-intro { margin-bottom: 0; position: sticky; top: 90px; }
  .frame { border-width: 5px; box-shadow: 0 10px 22px rgba(0, 0, 0, 0.16), 0 2px 4px rgba(0, 0, 0, 0.1); }
  .wall { padding: 7% 8%; }
}

@media (min-width: 1200px) {
  :root { --gutter: 64px; }
  .site-header { padding-left: var(--gutter); padding-right: var(--gutter); }
  .works-grid { column-gap: 2.5rem; }
  .walls, .collection, .about, .who, .how, .enquiry, .site-footer { padding-left: var(--gutter); padding-right: var(--gutter); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .work-img img { transition: none; }
  .hero-layer { transition: none; }
}
