/* Thornton Park Laundry — under one roof.
   Tokens per design/DESIGN.md §4. One ground, never broken. */

:root {
  --paper: #F5F6F5;
  --ink: #1F2A3D;
  --ink-2: #4C586E;
  --accent: #2F4D7D;
  --accent-hover: #274068;
  --hair: rgba(31, 42, 61, 0.14);
  --serif: Georgia, "Iowan Old Style", "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

main {
  animation: settle 450ms ease-out;
}

@keyframes settle {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

a { color: var(--accent); }

.hero, .rooms, .doorstep {
  scroll-margin-top: 88px;
}

a:focus-visible,
.btn-fill:focus-visible,
.btn-outline:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.skip {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 40;
  background: var(--paper);
  padding: 10px 16px;
  border: 1px solid var(--hair);
  border-radius: 999px;
  font-size: 15px;
}
.skip:focus { top: 12px; }

/* ————— Header ————— */

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 64px;
  padding: 8px 24px;
  background: var(--paper);
  border-bottom: 1px solid var(--hair);
}

.wordmark {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 19px;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 24px;
}

.header-link,
.header-dir {
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}
.header-link:hover,
.header-dir:hover { color: var(--accent); }

.header-dir { display: none; }

.header-call {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 20px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid var(--accent);
  transition: background 150ms ease, color 150ms ease, border-color 150ms ease;
}
.header-call:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.header-call.pill-quiet {
  background: transparent;
  color: var(--ink);
  border-color: var(--hair);
}
.header-call.pill-quiet:hover { color: var(--accent); border-color: var(--accent); }

/* ————— Shared actions ————— */

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

.btn-fill {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 0 26px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  transition: background 150ms ease, transform 70ms ease;
}
.btn-fill:hover { background: var(--accent-hover); }
.btn-fill:active { transform: scale(0.98); }

.btn-outline {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 0 24px;
  border-radius: 999px;
  border: 1.5px solid var(--accent);
  color: var(--accent);
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  transition: background 150ms ease, transform 70ms ease;
}
.btn-outline:hover { background: rgba(47, 77, 125, 0.07); }
.btn-outline:active { transform: scale(0.98); }

.text-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 16px;
  font-weight: 600;
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ————— Hero: under the roof ————— */

.hero {
  max-width: 1240px;
  margin: 0 auto;
  padding: 40px 24px 64px;
}

.gable {
  position: relative;
  margin: 0;
  height: 300px;
}

.gable img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 50%;
  clip-path: polygon(0 10%, 50% 0, 100% 10%, 100% 100%, 0 100%);
}

@media (min-width: 641px) {
  .gable {
    height: clamp(300px, 40vh, 420px);
  }
  .gable img {
    object-position: center 76%;
    clip-path: polygon(0 26%, 50% 0, 100% 26%, 100% 100%, 0 100%);
  }
  .roofline { height: 26%; }
}

.roofline {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 10%;
  pointer-events: none;
}
.roofline polyline {
  stroke: var(--accent);
  stroke-width: 5;
  stroke-linejoin: round;
  stroke-linecap: butt;
}

.name {
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(46px, 9.5vw, 100px);
  line-height: 1.02;
  letter-spacing: -0.01em;
  margin: 40px 0 0;
  max-width: 10em;
}

.lead {
  margin: 24px 0 0;
  font-size: 19px;
  line-height: 1.55;
  color: var(--ink-2);
  max-width: 34em;
}

/* ————— The rooms ————— */

.rooms {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: 1.3fr 1fr 1.25fr;
  border-top: 1px solid var(--hair);
}

.room {
  padding: 40px 32px 48px 0;
}
.room + .room {
  border-left: 1px solid var(--hair);
  padding-left: 32px;
}

.room-head {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: 16px;
  color: var(--ink-2);
  margin: 0 0 16px;
}

.room-figure {
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(27px, 3.3vw, 40px);
  line-height: 1.12;
  letter-spacing: -0.01em;
  margin: 0;
}

.room:first-child .room-figure {
  font-size: clamp(34px, 4.2vw, 52px);
}

.room-body {
  margin: 12px 0 0;
  font-size: 16px;
  color: var(--ink-2);
  max-width: 26em;
}

/* ————— The doorstep ————— */

.doorstep {
  max-width: 1240px;
  margin: 0 auto;
  padding: 64px 24px 96px;
  border-top: 1px solid var(--hair);
  display: grid;
  grid-template-columns: 5fr 7fr;
  gap: 64px;
  align-items: center;
}

.doorstep-photo {
  margin: 0;
}
.doorstep-photo img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 4px;
}

.doorstep-address {
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(30px, 4.6vw, 54px);
  line-height: 1.12;
  letter-spacing: -0.01em;
  margin: 0;
}

.call-label {
  font-family: var(--serif);
  font-style: italic;
  font-size: 16px;
  color: var(--ink-2);
  margin: 40px 0 8px;
}

.doorstep-phone {
  font-size: clamp(30px, 5vw, 56px);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
  color: var(--ink);
  text-decoration: none;
  display: inline-block;
  padding: 6px 0;
}
.doorstep-phone:hover { color: var(--accent); }

/* ————— Footer ————— */

.site-footer {
  border-top: 1px solid var(--hair);
  padding: 40px 24px 48px;
  text-align: left;
  max-width: 1240px;
  margin: 0 auto;
}
.site-footer p {
  margin: 0 0 6px;
  font-size: 14px;
  color: var(--ink-2);
}
.site-footer .footer-name {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 16px;
  color: var(--ink);
}
.site-footer a {
  color: var(--ink-2);
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 2px 0;
}

/* ————— Phone bar ————— */

.bar {
  display: none;
}

/* ————— Narrow ————— */

@media (max-width: 860px) {
  .rooms {
    grid-template-columns: 1fr;
    padding-bottom: 8px;
  }
  .room {
    padding: 32px 0 36px;
  }
  .room + .room {
    border-left: none;
    border-top: 1px solid var(--hair);
    padding-left: 0;
  }
  .doorstep {
    grid-template-columns: 1fr;
    gap: 40px;
    padding-top: 48px;
  }
  .doorstep-photo img {
    aspect-ratio: 4 / 3;
    object-fit: cover;
  }
}

@media (max-width: 640px) {
  .site-header { padding: 8px 16px; }
  .header-link, .header-call { display: none; }
  .header-dir { display: inline-flex; }
  .hero { padding: 24px 16px 48px; }
  .gable img { clip-path: polygon(0 13%, 50% 0, 100% 13%, 100% 100%, 0 100%); }
  .roofline { height: 13%; }
  .name { margin-top: 32px; }
  .rooms, .doorstep, .site-footer { padding-left: 16px; padding-right: 16px; }
  .site-footer a { min-height: 44px; }

  .bar {
    display: flex;
    gap: 12px;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 30;
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
    background: var(--paper);
    border-top: 1px solid var(--hair);
    transition: transform 250ms ease;
  }
  .bar .btn-fill, .bar .btn-outline {
    flex: 1;
    justify-content: center;
    padding: 0 12px;
    font-size: 15px;
  }
  .bar-aside { transform: translateY(110%); }
  body { padding-bottom: 76px; }
}

/* ————— Reduced motion ————— */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  main { animation: none; }
  .bar, .btn-fill, .btn-outline, .header-call { transition: none; }
}
