/* ============================================================
   Saidou Mechanics Workshop — Serekunda
   Palette: cafe warmth (creamy latte base, coffee-brown ink,
   burgundy accent, olive structure)
   ============================================================ */

:root {
  --bg: #f4ead8;
  --bg-2: #ece0c9;
  --ink: #3a2415;
  --ink-soft: #5c4229;
  --accent: #6b1f1a;
  --secondary: #5a5e3a;
  --paper: #fbf5e9;
  --rule: rgba(58, 36, 21, 0.18);
  --rule-light: rgba(244, 234, 216, 0.28);
  --on-dark: #f4ead8;
  --on-dark-soft: rgba(244, 234, 216, 0.72);

  --serif: "Fraunces", "Iowan Old Style", Georgia, serif;
  --sans: "Archivo", system-ui, -apple-system, "Segoe UI", sans-serif;

  --pad: clamp(1.15rem, 4vw, 3.5rem);
  --maxw: 78rem;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: clamp(0.95rem, 0.9rem + 0.25vw, 1.0625rem);
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  transition: background-color 420ms ease;
}

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

a { color: inherit; }

h1, h2, h3 { margin: 0; font-weight: 500; }

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

.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--ink); color: var(--on-dark);
  padding: 0.6rem 1rem; z-index: 99;
}
.skip:focus { left: 0.5rem; top: 0.5rem; }

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

/* ---------- shared type ---------- */

.eyebrow {
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 0.9rem;
}
.eyebrow--light { color: #e8b98f; }

.display {
  font-family: var(--serif);
  font-variation-settings: "opsz" 144, "SOFT" 40, "WONK" 1;
  font-weight: 500;
  font-size: clamp(4rem, 18vw, 20rem);
  line-height: 0.85;
  letter-spacing: -0.03em;
  margin-bottom: -0.34em;
  text-wrap: balance;
}

.display--mid {
  font-size: clamp(2.6rem, 8.5vw, 7rem);
  line-height: 0.92;
  margin-bottom: 0.42em;
}

.label {
  font-family: var(--sans);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  line-height: 1.5;
}
.label__no { display: block; color: var(--accent); font-weight: 600; }
.label__title { display: block; font-weight: 600; }
.label__meta { display: block; color: var(--ink-soft); text-transform: none; letter-spacing: 0.01em; }

/* ---------- top bar ---------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 0.7rem var(--pad);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--rule);
}

.mark { text-decoration: none; display: flex; flex-direction: column; line-height: 1.05; }
.mark__name {
  font-family: var(--serif);
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.mark__sub {
  font-size: 0.62rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.topnav {
  display: flex;
  gap: 1.1rem;
  margin-left: auto;
  font-size: 0.82rem;
  letter-spacing: 0.04em;
}
.topnav a {
  text-decoration: none;
  padding: 0.55rem 0.15rem;
  border-bottom: 1px solid transparent;
}
.topnav a:hover { border-bottom-color: var(--accent); }

.callbtn {
  display: inline-flex;
  align-items: baseline;
  gap: 0.45rem;
  text-decoration: none;
  background: var(--accent);
  color: var(--on-dark);
  padding: 0.6rem 0.95rem;
  min-height: 44px;
  border-radius: 2px;
  font-size: 0.9rem;
}
.callbtn__label { font-size: 0.66rem; letter-spacing: 0.16em; text-transform: uppercase; opacity: 0.8; }
.callbtn__num { font-weight: 600; letter-spacing: 0.02em; }
.callbtn:hover { background: #571713; }

/* ---------- hero ---------- */

.hero {
  position: relative;
  padding: clamp(2.5rem, 7vw, 6rem) var(--pad) clamp(2rem, 5vw, 4rem);
  max-width: var(--maxw);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(1.5rem, 4vw, 3rem);
}

.hero__type { position: relative; z-index: 2; }

.hero__lede {
  max-width: 34rem;
  font-size: clamp(1rem, 0.95rem + 0.4vw, 1.2rem);
  color: var(--ink-soft);
  margin-top: 1.6rem;
}

.hero__actions {
  margin-top: 1.8rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.4rem;
}

.bigcall {
  display: inline-block;
  font-family: var(--serif);
  font-variation-settings: "opsz" 144;
  font-size: clamp(1.9rem, 6vw, 3rem);
  font-weight: 600;
  letter-spacing: -0.01em;
  text-decoration: none;
  color: var(--on-dark);
  background: var(--accent);
  padding: 0.35em 0.6em 0.4em;
  border-radius: 2px;
  min-height: 44px;
  transition: transform 180ms ease, background-color 180ms ease;
}
.bigcall:hover { background: #571713; transform: translateY(-2px); }
.bigcall--dark { background: var(--ink); }
.bigcall--dark:hover { background: #241508; }

.hero__note { font-size: 0.82rem; color: var(--ink-soft); margin: 0; max-width: 16rem; }

.hero__figure { margin: 0; position: relative; }
.hero__figure img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 2px;
}
.hero__figure .label {
  margin-top: 0.7rem;
  padding-left: 0.9rem;
  border-left: 2px solid var(--accent);
}

.strip {
  grid-column: 1 / -1;
  list-style: none;
  margin: 0;
  padding: 1.2rem 0 0;
  border-top: 1px solid var(--rule);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
  gap: 1rem 1.5rem;
}
.strip__k {
  display: block;
  font-size: 0.66rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.2rem;
}
.strip__v { font-size: 0.92rem; }
.strip__v a { text-decoration: none; border-bottom: 1px solid var(--rule); }

/* ---------- section shells ---------- */

section { padding: clamp(3rem, 8vw, 7rem) var(--pad); }
section > * { max-width: var(--maxw); margin-left: auto; margin-right: auto; }

.sectionhead { max-width: 46rem; margin-bottom: clamp(2rem, 5vw, 3.5rem); }
.sectionhead__lede { color: var(--on-dark-soft); max-width: 40rem; }

/* dark sections flip their ink */
.services, .how, .hours { color: var(--on-dark); }
.services .sectionhead__lede,
.how .sectionhead__lede,
.hours .hours__lede { color: var(--on-dark-soft); }

/* ---------- services: museum wall ---------- */

.wall {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr));
  gap: clamp(2rem, 5vw, 4rem) clamp(1.5rem, 4vw, 3.5rem);
}

.work { display: grid; gap: 0.9rem; align-content: start; }

.work__fig { margin: 0; overflow: hidden; border-radius: 2px; }
.work__fig img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  filter: saturate(0.92) contrast(1.03);
  transition: transform 600ms cubic-bezier(0.2, 0.7, 0.2, 1);
}
.work:hover .work__fig img { transform: scale(1.03); }

.label--work {
  padding-left: 0.9rem;
  border-left: 2px solid #e8b98f;
}
.label--work .label__title {
  font-family: var(--serif);
  font-size: 1.35rem;
  text-transform: none;
  letter-spacing: -0.01em;
  font-weight: 600;
  margin: 0.15rem 0 0.3rem;
}
.label--work .label__no { color: #e8b98f; }
.label--work .label__meta { color: var(--on-dark-soft); font-size: 0.76rem; }

.work__body { color: var(--on-dark-soft); font-size: 0.92rem; max-width: 34rem; }

/* ---------- workshop ---------- */

.workshop__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}
.workshop__text p { max-width: 38rem; color: var(--ink-soft); }
.workshop__fig { margin: 0; }
.workshop__fig img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 2px; }
.workshop__fig .label {
  margin-top: 0.7rem;
  padding-left: 0.9rem;
  border-left: 2px solid var(--accent);
}

.facts {
  list-style: none;
  margin: 2rem 0 0;
  padding: 1.2rem 0 0;
  border-top: 1px solid var(--rule);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr));
  gap: 1rem 1.5rem;
}
.facts__k {
  display: block;
  font-size: 0.66rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.2rem;
}
.facts__v { font-family: var(--serif); font-size: 1.15rem; font-weight: 600; }

/* ---------- how it works ---------- */

.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr));
  gap: clamp(1.5rem, 4vw, 2.5rem);
}
.step { border-top: 1px solid var(--rule-light); padding-top: 1rem; }
.step__no {
  display: block;
  font-family: var(--serif);
  font-size: 2.6rem;
  font-weight: 600;
  line-height: 1;
  color: #e8b98f;
  margin-bottom: 0.5rem;
}
.step h3 {
  font-family: var(--serif);
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
}
.step p { color: var(--on-dark-soft); font-size: 0.92rem; }

/* ---------- hours ---------- */

.hours__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}
.hours__lede { max-width: 32rem; }

.timetable {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}
.timetable th,
.timetable td {
  text-align: left;
  padding: 0.85rem 0.2rem;
  border-bottom: 1px solid var(--rule-light);
}
.timetable th {
  font-weight: 500;
  letter-spacing: 0.02em;
}
.timetable td {
  text-align: right;
  font-variant-numeric: tabular-nums;
  color: #f0c9a0;
}

/* ---------- visit ---------- */

.visit__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(2rem, 5vw, 4rem);
}
.addr {
  font-family: var(--serif);
  font-size: clamp(1.3rem, 3.4vw, 1.9rem);
  font-style: normal;
  font-weight: 500;
  line-height: 1.35;
  margin: 0 0 1.2rem;
}
.visit__hint { color: var(--ink-soft); max-width: 34rem; font-size: 0.95rem; }
.visit__note { font-size: 0.85rem; color: var(--ink-soft); margin-top: 1rem; max-width: 24rem; }

.inline-link {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid currentColor;
  padding-bottom: 1px;
}

.visit__col--call {
  background: var(--bg-2);
  padding: clamp(1.4rem, 4vw, 2.4rem);
  border-radius: 2px;
  border: 1px solid var(--rule);
}

/* ---------- footer ---------- */

.foot {
  padding: clamp(2rem, 5vw, 3.5rem) var(--pad) clamp(4rem, 8vw, 5rem);
  border-top: 1px solid var(--rule);
  background: var(--bg);
}
.foot__inner { max-width: var(--maxw); margin: 0 auto; }
.foot__line { font-size: 0.88rem; margin-bottom: 0.5rem; }
.foot__line--muted { color: var(--ink-soft); }
.foot__line a { color: var(--accent); }

.claim-banner {
  display: inline-block;
  margin: 1.1rem 0 0.6rem;
  padding: 0.5rem 0.8rem;
  font-size: 0.76rem;
  text-decoration: none;
  color: var(--ink-soft);
  background: color-mix(in srgb, var(--ink) 7%, transparent);
  border: 1px solid var(--rule);
  border-radius: 2px;
}
.claim-banner:hover { color: var(--ink); border-color: var(--ink-soft); }

.attribution {
  margin: 0.4rem 0 0;
  font-size: 0.72rem;
  opacity: 0.6;
}
.attribution a { color: inherit; }

/* ---------- diagonal split signature ---------- */

.split {
  position: relative;
  overflow: clip;
  padding: 0;
  background: var(--ink);
  color: var(--on-dark);
}
.split__panel {
  padding: clamp(2.5rem, 7vw, 5rem) var(--pad);
  will-change: transform;
}
.split__panel--a {
  clip-path: polygon(0 0, 100% 0, 100% 78%, 0 100%);
  background: var(--secondary);
  padding-bottom: clamp(5rem, 14vw, 10rem);
}
.split__panel--b {
  clip-path: polygon(0 22%, 100% 0, 100% 100%, 0 100%);
  background: var(--accent);
  margin-top: clamp(-6rem, -10vw, -3rem);
  padding-top: clamp(6rem, 16vw, 11rem);
}
.split__inner { max-width: var(--maxw); margin: 0 auto; }
.split h2 {
  font-family: var(--serif);
  font-size: clamp(2rem, 6vw, 4rem);
  line-height: 0.95;
  font-weight: 500;
  margin-bottom: 0.5em;
}
.split p { max-width: 34rem; color: rgba(244, 234, 216, 0.82); }
.split__quote {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.15rem, 2.6vw, 1.6rem);
  line-height: 1.4;
  color: var(--on-dark);
  max-width: 30rem;
}

/* ---------- view transitions ---------- */

@view-transition { navigation: auto; }

::view-transition-old(root) {
  animation: vt-out 320ms cubic-bezier(0.4, 0, 1, 1) both;
}
::view-transition-new(root) {
  animation: vt-in 420ms cubic-bezier(0, 0, 0.2, 1) both;
}
@keyframes vt-out {
  to { opacity: 0; transform: translateY(-1.2rem); }
}
@keyframes vt-in {
  from { opacity: 0; transform: translateY(1.6rem); }
}

/* ---------- responsive ---------- */

@media (min-width: 46rem) {
  .hero {
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
    align-items: end;
  }
  .hero__figure { align-self: end; }
  .workshop__grid { grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); }
  .hours__grid { grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); }
  .visit__grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}

@media (min-width: 62rem) {
  .hero { padding-top: clamp(3rem, 6vw, 6rem); }
  .hero__figure { margin-top: 3rem; }
}

@media (max-width: 45.99rem) {
  .topnav { order: 3; width: 100%; margin-left: 0; overflow-x: auto; gap: 0.9rem; }
  .callbtn { margin-left: auto; }
  .display { font-size: clamp(3.4rem, 22vw, 8rem); }
}

/* ---------- reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .split__panel { transform: none !important; }
  .work:hover .work__fig img { transform: none; }
  ::view-transition-old(root),
  ::view-transition-new(root) { animation: none; }
}
