/* Lock Ekspert landing: a brass key on vault green, its cuts spelling the phone number. Mobile-first. Effects play once, and only under prefers-reduced-motion: no-preference. */

:root {
  --vault: #12302A;
  --brass: #D9A845;
  --brass-hi: #EBC877;
  --brass-deep: #8C6418;
  --chalk: #EDF1EB;
  --paper: #F8FAF6;
  --ink: #10241F;
  --ink-soft: #46564F;
  --mist: #A9BEB5;
  --pin: #5F8277;
  --rule-dark: #2A5046;

  --display: "Sofia Sans Extra Condensed", "Arial Narrow", "Roboto Condensed", sans-serif-condensed, sans-serif;
  --body: "Sofia Sans", system-ui, -apple-system, "Segoe UI", sans-serif;

  --gutter: 20px;
  --max: 1180px;
  --radius: 14px;
  --ease-set: cubic-bezier(.2, .7, .2, 1);
  --focus: var(--vault);
  --ph-line: var(--brass-deep);
  color-scheme: light;
}

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

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  background: var(--chalk);
  color: var(--ink);
  font: 400 1.0625rem/1.55 var(--body);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  margin: 0;
  font-family: var(--display);
  font-weight: 800;
  line-height: 1;
  text-wrap: balance;
  overflow-wrap: break-word;
}
h2 { font-size: clamp(2.5rem, 10vw, 4.5rem); }
h3 { font-size: 1.75rem; line-height: 1.05; }

p, ul, ol, dl, dd, figure, blockquote, address { margin: 0; }
ul, ol { padding: 0; list-style: none; }
address { font-style: normal; }
svg { display: block; }

a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: .2em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }

.wrap {
  width: 100%;
  max-width: calc(var(--max) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.on-dark {
  --focus: var(--brass);
  --ph-line: var(--brass);
  background: var(--vault);
  color: var(--chalk);
}

.skip {
  position: absolute; top: -80px; left: var(--gutter); z-index: 50;
  padding: 10px 16px; border-radius: 8px;
  background: var(--brass); color: var(--vault);
  font-weight: 700; text-decoration: none;
}
.skip:focus { top: 12px; }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.icon {
  flex: none; width: 22px; height: 22px;
  fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}

.stars { flex: none; width: 108px; height: 20px; color: var(--brass); fill: currentColor; }
.stars--big { width: 162px; height: 30px; }
.stars--small { width: 81px; height: 15px; }

/* Facts still to confirm with the owner */
.ph {
  padding: 0 .3em;
  border-radius: 3px;
  background: color-mix(in srgb, var(--brass) 24%, transparent);
  outline: 1.5px dashed var(--ph-line);
  outline-offset: -1.5px;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 12px;
  min-height: 56px; padding: 12px 24px;
  background: var(--brass); color: var(--vault);
  border: 2px solid var(--vault); border-radius: var(--radius);
  font: 800 1.375rem/1 var(--display); letter-spacing: .01em;
  text-decoration: none;
}
.btn:hover { background: var(--brass-hi); }
.btn--ghost { background: transparent; color: inherit; border-color: currentColor; }
.btn--ghost:hover { background: color-mix(in srgb, currentColor 12%, transparent); }

/* Header */
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding-block: 14px;
}
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.brand__mark { width: 40px; height: 40px; color: var(--brass); fill: currentColor; }
.brand__name { font: 800 1.625rem/1 var(--display); letter-spacing: .01em; }
.site-nav { display: none; }
.header-call {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-width: 44px; min-height: 44px;
  font-weight: 700; white-space: nowrap; text-decoration: none;
}
.header-call .icon { width: 20px; height: 20px; color: var(--brass); }
.header-call span { display: none; }
.header-call:hover span { text-decoration: underline; }
@media (min-width: 380px) {
  .header-call span { display: inline; }
}
@media (min-width: 900px) {
  .site-header .wrap { padding-block: 20px; }
  .site-nav { display: flex; gap: 28px; margin-left: auto; margin-right: 16px; }
  .site-nav a { color: var(--mist); font-weight: 600; text-decoration: none; }
  .site-nav a:hover { color: var(--chalk); }
}

/* Hero */
.hero { padding-block: 24px 64px; }
.hero .wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas: "title" "lede" "actions" "key";
  row-gap: 24px;
}
.hero__title { grid-area: title; font-size: clamp(3.25rem, 14vw, 8rem); }
.hero__title span { display: block; }
.hero__lede { grid-area: lede; max-width: 40ch; font-size: 1.1875rem; line-height: 1.5; color: var(--mist); }
.hero__actions { grid-area: actions; display: grid; justify-items: start; gap: 16px; }
.hero__actions .btn { width: 100%; }
.rating { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; font-weight: 600; text-decoration: none; }
.rating span { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .2em; }
.rating:hover span { text-decoration-thickness: 2px; }
.hero__hours { font-size: .9375rem; color: var(--mist); }

.key { grid-area: key; margin-top: 16px; }
.key svg { width: 100%; height: auto; }
.key__metal { fill: var(--brass); }
.key__grooves { fill: none; stroke: var(--brass-deep); stroke-width: 3; stroke-linecap: round; opacity: .6; }
.key__stamp { fill: var(--brass-deep); font: 800 15px var(--display); letter-spacing: .5px; text-anchor: middle; }
.key__pins { fill: none; stroke: var(--pin); stroke-width: 8; stroke-linecap: round; }
.key__code { fill: var(--chalk); font: 800 26px var(--display); text-anchor: middle; }
.key figcaption { margin-top: 12px; font-size: .9375rem; color: var(--mist); }

@media (min-width: 640px) {
  .hero__actions .btn { width: auto; }
}
@media (min-width: 900px) {
  .hero { padding-block: 40px 96px; }
  .hero .wrap {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    grid-template-rows: auto auto 1fr;
    grid-template-areas: "title title" "lede key" "actions key";
    column-gap: 64px;
    row-gap: 28px;
  }
  .key { margin-top: 0; align-self: center; }
}

/* Hero key effect, started by main.js setting data-reveal="done". Gated on .js and no-preference so nothing is ever hidden without them. */
@media (prefers-reduced-motion: no-preference) {
  .js .key[data-reveal=""] .key__pins path { transform: translateY(90px); }
  .js .key[data-reveal=""] .key__code text { opacity: 0; }
  .js .key[data-reveal="done"] .key__pins path {
    animation: pin-set .42s var(--ease-set) both;
    animation-delay: calc(150ms + var(--i, 0) * 70ms);
  }
  .js .key[data-reveal="done"] .key__code text {
    animation: code-show .3s ease-out both;
    animation-delay: calc(450ms + var(--i, 0) * 70ms);
  }
}
@keyframes pin-set {
  from { transform: translateY(90px); }
  to { transform: none; }
}
@keyframes code-show {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

/* What happened */
.situations { padding-block: 72px; }
.situations .wrap { display: grid; gap: 32px; }
.situation { display: grid; gap: 8px; padding-block: 20px 24px; border-top: 2px solid var(--ink); }
.situation:last-child { border-bottom: 2px solid var(--ink); }
.situation p { max-width: 54ch; color: var(--ink-soft); }
@media (min-width: 900px) {
  .situations { padding-block: 112px; }
  .situations .wrap { grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); column-gap: 64px; align-items: start; }
  .situation { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); column-gap: 32px; align-items: baseline; padding-block: 24px 28px; }
}

/* From the call to an open door */
.steps { padding-block: 72px; background: var(--paper); }
.steps h2 { max-width: 14ch; }
.steps__list { display: grid; gap: 32px; margin-top: 40px; }
.step { display: grid; gap: 8px; align-content: start; }
.step__no { font: 800 4rem/.9 var(--display); color: var(--brass-deep); }
.step p { max-width: 40ch; color: var(--ink-soft); }
@media (min-width: 900px) {
  .steps { padding-block: 112px; }
  .steps__list { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 48px; margin-top: 56px; }
}

/* Price list */
.prices { padding-block: 72px; }
.prices .wrap { display: grid; gap: 32px; }
.prices__head { display: grid; gap: 16px; align-content: start; }
.prices__head p { max-width: 44ch; color: var(--ink-soft); }
.pricelist { display: grid; gap: 4px; }
.pricelist div { display: flex; align-items: baseline; gap: 12px; padding-block: 10px; }
.pricelist dt { flex: 1; display: flex; align-items: baseline; gap: 12px; font-weight: 600; }
.pricelist dt::after { content: ""; flex: 1; min-width: 24px; border-bottom: 2px dotted var(--ink-soft); }
.pricelist dd { font: 800 1.375rem/1 var(--display); white-space: nowrap; }
@media (min-width: 900px) {
  .prices { padding-block: 112px; }
  .prices .wrap { grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); column-gap: 64px; }
}

/* Reviews */
.reviews { padding-block: 72px; }
.reviews .wrap { display: grid; justify-items: start; gap: 24px; }
.reviews h2 { max-width: 16ch; }
.quotes { display: grid; gap: 32px; width: 100%; margin-block: 16px; }
.quote { display: grid; gap: 12px; align-content: start; }
.quote blockquote { font-size: 1.25rem; line-height: 1.45; }
.quote figcaption { font-size: .9375rem; color: var(--mist); }
@media (min-width: 900px) {
  .reviews { padding-block: 112px; }
  .quotes { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 48px; }
}

/* Contact */
.contact { padding-block: 72px; }
.contact .wrap { display: grid; gap: 32px; }
.facts > div { display: grid; gap: 4px; padding-block: 16px 18px; border-top: 2px solid var(--ink); }
.facts > div:last-child { border-bottom: 2px solid var(--ink); }
.facts dt { font-size: .9375rem; font-weight: 700; color: var(--ink-soft); }
.facts dd { font-size: 1.25rem; line-height: 1.4; }
.facts dd > a { font-weight: 700; }
.facts__links { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 8px; font-size: 1rem; font-weight: 600; }
.photo-ph {
  display: grid; place-items: center;
  aspect-ratio: 4 / 3; padding: 24px;
  border: 2px dashed var(--brass-deep); border-radius: var(--radius);
  background: color-mix(in srgb, var(--brass) 12%, transparent);
  color: var(--ink-soft); text-align: center;
}
@media (min-width: 900px) {
  .contact { padding-block: 112px; }
  .contact .wrap {
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    grid-template-areas: "title title" "facts photo";
    column-gap: 64px;
    row-gap: 40px;
    align-items: start;
  }
  .contact h2 { grid-area: title; }
  .facts { grid-area: facts; }
  .photo-ph { grid-area: photo; }
}

/* Last call */
.final { padding-block: 80px 48px; }
.final h2 { font-size: clamp(2.5rem, 10vw, 5rem); }
.final__phone {
  display: inline-block; margin-top: 8px;
  font: 800 clamp(2.75rem, 14vw, 10rem)/1 var(--display); letter-spacing: .01em;
  color: var(--brass); text-decoration: none;
}
.final__phone:hover { color: var(--brass-hi); }

/* Last call effect, started by main.js like the hero key. The clip sits on .final__digits, not the link, so the link's focus outline is never cut. */
.final__digits { display: inline-block; white-space: nowrap; clip-path: inset(0 -.1em); }
.final__digits span { display: inline-block; }
@media (prefers-reduced-motion: no-preference) {
  .js .final__phone[data-reveal=""] .final__digits span { transform: translateY(100%); }
  .js .final__phone[data-reveal="done"] .final__digits span {
    animation: digit-set .38s var(--ease-set) both;
    animation-delay: calc(var(--i, 0) * 45ms);
  }
}
@keyframes digit-set {
  from { transform: translateY(100%); }
  to { transform: none; }
}
.final p { margin-top: 16px; font-size: 1.1875rem; color: var(--mist); }
@media (min-width: 900px) {
  .final { padding-block: 120px 64px; }
}

/* Footer: the bottom padding keeps the phone call bar off the last line */
.site-footer { padding-block: 0 112px; font-size: .9375rem; color: var(--mist); }
.site-footer .wrap { display: grid; gap: 4px; padding-top: 24px; border-top: 1px solid var(--rule-dark); }
@media (min-width: 900px) {
  .site-footer { padding-bottom: 48px; }
}

/* Call bar: shown on phones once the hero's call button has scrolled away (main.js) */
.callbar {
  position: fixed; right: 12px; bottom: 12px; left: 12px; z-index: 30;
  box-shadow: 0 10px 28px rgb(18 48 42 / .35);
}
.callbar:focus-visible { outline: 3px solid var(--vault); outline-offset: 2px; box-shadow: 0 0 0 7px var(--brass-hi); }
.js .callbar[data-hidden="true"] { visibility: hidden; }
@media (min-width: 900px) {
  .callbar { display: none; }
}
