/* Gable & Blade · The Tiled Shop
   One continuous glazed-tile wall. Four glazes only: white glaze, cobalt, ink, grout.
   State is shown by inversion (a tile turning cobalt), never by a new colour. */

@font-face {
  font-family: "Archivo";
  src: url("../../uploads/fonts/Archivo-Variable-latin.woff2") format("woff2"),
       url("../../uploads/fonts/Archivo-Variable.ttf") format("truetype");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
}
@font-face {
  font-family: "Manrope";
  src: url("../../uploads/fonts/Manrope-Variable.ttf") format("truetype");
  font-weight: 200 800;
  font-display: swap;
}

:root {
  --glaze: #f3f3ef;
  --glaze-shade: #e3e1dc;
  --grout: #a29b95;
  --grout-light: #d9d6cf;
  --cobalt: #15328a;
  --cobalt-deep: #0b2067;
  --cobalt-lit: #2a4cb3;
  --ink: #121316;
  --ink-soft: #4d4b48;
  --frieze: #f7f6ef;
  --strip: #f1f0e9;
  --chrome: #c9ccd0;

  /* comp unit: 1 px of the 2560 x 1440 approved comp */
  --u: min(100vw / 2560, 100svh / 1440);
  --tile: calc(176 * var(--u));
  --wall-module: calc(var(--tile) * 6);
  --wall-ox: calc(38 * var(--u));
  --wall-oy: calc(26 * var(--u));
  --line: calc(270 * var(--u));

  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --sans: "Archivo", "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 88px; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0;
  background: var(--glaze);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 400;
  font-size: 17px;
  line-height: 1.55;
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
button { font: inherit; color: inherit; }
::selection { background: var(--cobalt-deep); color: var(--glaze); }
:focus-visible { outline: 3px solid var(--cobalt-lit); outline-offset: 3px; border-radius: 2px; }
html { scrollbar-color: var(--cobalt) var(--glaze-shade); }
::-webkit-scrollbar { width: 12px; }
::-webkit-scrollbar-track { background: var(--glaze-shade); }
::-webkit-scrollbar-thumb { background: var(--cobalt); border: 3px solid var(--glaze-shade); border-radius: 2px; }

.sr-only {
  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: 12px; top: -80px; z-index: 100;
  background: var(--cobalt-deep); color: var(--glaze);
  padding: 12px 18px; font-weight: 600; text-decoration: none;
}
.skip:focus { top: 12px; }

/* ---------- Glaze: cobalt tile texture clipped to letterforms ---------- */
[data-glaze] .wm-line,
.glaze-text {
  color: var(--cobalt-deep);
  background-image:
    radial-gradient(circle calc(var(--tile) * 2.4) at var(--sx, -50%) var(--sy, -50%), rgba(255, 255, 255, .42), rgba(255, 255, 255, 0) 70%),
    image-set(url("../plates/cobalt-glaze.webp") type("image/webp"), url("../plates/cobalt-glaze.png") type("image/png"));
  background-size: 100% 100%, var(--wall-module) var(--wall-module);
  background-position: 0 0, calc(var(--gx, 0px) + var(--wall-ox)) calc(var(--gy, 0px) + var(--wall-oy));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
/* Lettering tiles are one course tall: horizontal seams fall between lines, never through a letter. */
[data-glaze] .wm-line {
  background-size: 100% 100%, var(--wall-module) calc(var(--line) * 6);
  background-position: 0 0, calc(var(--gx, 0px) + var(--wall-ox)) calc(-2 * var(--u));
}
.foot-mark .glaze-text {
  /* one course tall, like the hero lettering */
  background-size: 100% 100%, var(--wall-module) calc(1em * 6);
  background-position: 0 0, calc(var(--gx, 0px) + var(--wall-ox)) 0;
}

/* ---------- Demo strip ---------- */
.demo-strip {
  margin: 0;
  height: calc(63 * var(--u));
  min-height: 30px;
  display: flex; align-items: center; justify-content: center;
  background: var(--strip);
  color: #6e6a65;
  font-size: max(calc(27 * var(--u)), 10.5px);
  font-weight: 500;
  letter-spacing: .035em;
  text-transform: uppercase;
  position: relative; z-index: 3;
  padding: 0 16px;
  text-align: center;
}

/* ---------- Hero header (sits on the wall) ---------- */
.hero-head {
  position: absolute; z-index: 5;
  left: 0; right: 0;
  top: max(calc(94 * var(--u)), 38px);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 1.4% 0 1.6%;
  pointer-events: none;
}
.hero-head > * { pointer-events: auto; }
.nav-links { display: flex; gap: calc(50 * var(--u)); }
.nav-links a {
  font-size: max(calc(37 * var(--u)), 15px);
  font-weight: 420;
  line-height: 1.25;
  text-decoration: none;
  color: var(--ink);
  padding: 4px 0;
  background: linear-gradient(var(--cobalt-deep), var(--cobalt-deep)) left 100% / 0 2px no-repeat;
  transition: background-size .35s var(--ease-out), color .2s;
}
.nav-links a:hover { background-size: 100% 2px; color: var(--cobalt-deep); }
.menu-btn {
  width: max(calc(72 * var(--u)), 44px);
  height: max(calc(46 * var(--u)), 44px);
  display: grid; place-items: center;
  background: none; border: 0; padding: 0; cursor: pointer;
}
.menu-btn svg { width: max(calc(44 * var(--u)), 26px); stroke: var(--ink); stroke-width: 1.7; fill: none; overflow: visible; }
.menu-btn:hover svg { stroke: var(--cobalt-deep); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  height: calc(1377 * var(--u));
  min-height: 520px;
  overflow: hidden;
  isolation: isolate;
}
.wall { position: absolute; top: 0; bottom: calc(115 * var(--u)); z-index: -1; }
.wall-left {
  left: 0; width: 50%;
  background: image-set(url("../plates/wall-tile.webp") type("image/webp"), url("../plates/wall-tile.png") type("image/png")) var(--wall-ox) var(--wall-oy) / var(--wall-module) var(--wall-module);
}
.wall-right {
  left: 50%; right: 0;
  background: image-set(url("../plates/wall-tile-right.webp") type("image/webp"), url("../plates/wall-tile-right.png") type("image/png")) calc(13 * var(--u)) calc(542 * var(--u)) / calc(666 * var(--u)) calc(460 * var(--u));
  box-shadow: inset 1px 0 0 rgba(0, 0, 0, .06);
}

.wordmark {
  position: absolute;
  left: 1.6%;
  top: calc(155 * var(--u));
  margin: 0;
  display: flex; flex-direction: column; align-items: flex-start;
  font-size: calc(391 * var(--u));
  font-weight: 900;
  font-stretch: 82%;
  line-height: .69;
  letter-spacing: -.02em;
  text-transform: uppercase;
  filter: drop-shadow(0 calc(4 * var(--u)) calc(5 * var(--u)) rgba(6, 18, 64, .28));
}
.wm-line { display: block; }
.wm-line:first-child { font-stretch: 82%; }
.wm-line:last-child { font-stretch: 87%; }
.wm-amp { font-stretch: 100%; letter-spacing: 0; font-size: 1.04em; line-height: .664; }

.hero-tagline {
  position: absolute; left: 1.7%;
  top: calc(976 * var(--u));
  margin: 0;
  font-size: calc(50 * var(--u));
  line-height: 1.2;
  color: var(--ink);
  letter-spacing: -.005em;
}

.enamel {
  display: inline-flex; align-items: center; justify-content: center;
  text-decoration: none;
  color: #fff;
  font-weight: 400;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .10), rgba(255, 255, 255, 0) 50%),
    image-set(url("../plates/cobalt-glaze.webp") type("image/webp"), url("../plates/cobalt-glaze.png") type("image/png")) 38% 22% / 520px 520px,
    var(--cobalt);
  /* one whole glazed tile behind every enamel button: no grout crosses it */
  background-size: auto, 2700px 2700px, auto;
  background-position: 0 0, -470px -480px, 0 0;
  border: 1px solid #0a1c5c;
  border-radius: calc(6 * var(--u));
  box-shadow: inset 0 0 0 2px rgba(120, 150, 230, .22), inset 0 -2px 0 rgba(0, 0, 0, .22), 0 1px 3px rgba(6, 18, 64, .22);
  position: relative; overflow: hidden;
  transition: transform .25s var(--ease-out), box-shadow .25s;
}
.enamel::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(105deg, transparent 30%, rgba(255, 255, 255, .45) 48%, transparent 62%);
  transform: translateX(-120%);
  transition: transform .8s var(--ease-out);
}
.enamel:hover::after { transform: translateX(120%); }
.enamel:hover { transform: translateY(-1px); box-shadow: inset 0 0 0 2px rgba(120, 150, 230, .3), inset 0 -2px 0 rgba(0, 0, 0, .22), 0 6px 14px rgba(6, 18, 64, .28); }
.enamel:active { transform: translateY(1px); }

.hero-book {
  /* one whole glazed tile set into the wall: bevelled edge, grout gap, no grout across it */
  border-radius: calc(7 * var(--u));
  outline: 0;
  color: #e7e8ec;
  background-color: #112c78;
  /* the comp's tile: a lighter glazed bevel all round, a soft pooled centre */
  box-shadow: inset 0 0 0 calc(2 * var(--u)) #0a1d5e, inset 0 0 0 calc(6 * var(--u)) rgba(92, 122, 205, .5), inset 0 0 calc(14 * var(--u)) calc(4 * var(--u)) rgba(8, 26, 86, .45), 0 1px 2px rgba(6, 18, 64, .2);
  background-image: linear-gradient(rgba(5, 18, 74, .3), rgba(5, 18, 74, .3)), image-set(url("../plates/cobalt-glaze.webp") type("image/webp"), url("../plates/cobalt-glaze.png") type("image/png")), none !important;
  background-size: auto, calc(2700 * var(--u)) calc(2700 * var(--u)), auto;
  background-position: 0 0, calc(-470 * var(--u)) calc(-480 * var(--u)), 0 0;
  position: absolute; left: calc(2% + 2 * var(--u));
  top: calc(1069 * var(--u));
  width: calc(385 * var(--u)); height: calc(90 * var(--u));
  min-width: 160px; min-height: 48px;
  font-size: max(calc(41 * var(--u)), 16px);
}

.hero-mirror {
  position: absolute; margin: 0;
  right: 5.9%;
  top: calc(45 * var(--u));
  width: calc(742 * var(--u));
  height: calc(1153 * var(--u));
  filter: drop-shadow(0 calc(10 * var(--u)) calc(16 * var(--u)) rgba(20, 22, 30, .18));
}
.hero-mirror img { width: 100%; height: 100%; object-fit: cover; }

.price-frieze {
  position: absolute; left: 0; right: 0; bottom: 0;
  height: calc(115 * var(--u));
  min-height: 52px;
  margin: 0; padding: 0; list-style: none;
  display: grid; grid-template-columns: repeat(4, 1fr);
  background: var(--frieze);
  border-top: 1px solid var(--grout-light);
}
.price-frieze li + li { border-left: 1px solid #cfccc4; }
.price-frieze a {
  height: 100%;
  display: flex; align-items: center; justify-content: center; gap: .3em;
  text-decoration: none; color: var(--ink);
  font-size: max(calc(44 * var(--u)), 14px);
  letter-spacing: -.012em;
  white-space: nowrap;
  transition: background-color .25s, color .25s;
}
.price-frieze a:hover, .price-frieze a:focus-visible { background: var(--cobalt-deep); color: var(--glaze); }

/* ---------- Mobile: the wall stacks ---------- */
@media (max-width: 899px) {
  :root { --u: calc(100vw / 1100); --tile: 17vw; }
  .demo-strip { height: auto; padding: 8px 16px; font-size: 10.5px; letter-spacing: .14em; }
  .hero-head { position: absolute; top: 46px; padding: 0 12px 0 16px; }
  .nav-links { display: none; }
  .hero-head::before {
    content: "Exeter · Gandy St"; font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-soft);
  }
  .hero {
    height: auto; min-height: 0;
    padding: 76px 16px 0;
    display: flex; flex-direction: column;
  }
  .wall { bottom: 0; }
  .wall-left { width: 100%; }
  .wall-right { display: none; }
  .wordmark { position: static; font-size: 28.6vw; filter: drop-shadow(0 2px 3px rgba(6, 18, 64, .28)); }
  .hero-tagline { position: static; font-size: 19px; margin: 22px 0 18px; max-width: 22ch; }
  .hero-book { position: static; width: 100%; height: 58px; font-size: 18px; border-radius: 6px; outline-width: 4px; background-size: auto, 2700px 2700px, auto; background-position: 0 0, -470px -480px, 0 0; }
  .hero-mirror { position: relative; right: auto; top: auto; width: 100%; height: auto; aspect-ratio: 794 / 1100; margin: 28px 0 0; }
  .price-frieze {
    position: relative; height: auto; margin: 0 -16px;
    grid-template-columns: 1fr 1fr;
  }
  .price-frieze li + li { border-left: 0; }
  .price-frieze li { border-top: 1px solid #cfccc4; }
  .price-frieze li:nth-child(even) { border-left: 1px solid #cfccc4; }
  .price-frieze a { flex-direction: column; gap: 2px; padding: 16px 8px; font-size: 15px; white-space: normal; text-align: center; min-height: 72px; }
  .price-frieze .num { color: var(--ink-soft); font-size: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
