/* Berwick Locksmiths — cascade / staircase layout */

:root {
  --forest: #1e3d32;
  --forest-deep: #152c24;
  --sage: #8fa892;
  --mist: #e9eef0;
  --mist-2: #d5dde2;
  --ink: #16201c;
  --muted: #4d5c56;
  --white: #f7faf9;

  --font-display: "Cormorant Garamond", Georgia, serif;
  --font-body: "Mulish", "Segoe UI", sans-serif;

  --pad: clamp(1.2rem, 4.2vw, 3.5rem);
  --max: 68rem;
  --ease: cubic-bezier(0.22, 0.9, 0.28, 1);
  --top-h: 3.6rem;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

@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;
  }
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.05rem;
  font-weight: 400;
  line-height: 1.65;
  color: var(--ink);
  background:
    radial-gradient(ellipse 60% 40% at 100% 0%, rgba(143, 168, 146, 0.18), transparent 55%),
    linear-gradient(180deg, var(--mist) 0%, var(--mist-2) 100%);
  min-height: 100vh;
  overflow-x: hidden;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--forest);
}

:focus-visible {
  outline: 2px solid var(--sage);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  padding: 0.75rem 1rem;
  background: var(--forest);
  color: var(--white);
}

.skip-link:focus {
  left: 1rem;
}

.tag {
  margin: 0 0 0.65rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--sage);
}

.tag--light {
  color: var(--sage);
}

/* ——— Top ——— */
.top {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 1.25rem;
  height: var(--top-h);
  padding: 0 var(--pad);
  background: color-mix(in srgb, var(--mist) 90%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid color-mix(in srgb, var(--ink) 8%, transparent);
}

.top__brand {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
  text-decoration: none;
  color: var(--forest);
}

.top__nav {
  display: flex;
  gap: 1.3rem;
  margin-left: auto;
  font-size: 0.9rem;
  font-weight: 600;
}

.top__nav a {
  text-decoration: none;
  opacity: 0.7;
}

.top__nav a:hover {
  opacity: 1;
  color: var(--forest);
}

.top__call {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  text-decoration: none;
  color: var(--forest);
  white-space: nowrap;
}

/* ——— Buttons ——— */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.95rem 1.5rem;
  font-family: var(--font-body);
  font-size: 0.92rem;
  font-weight: 700;
  text-decoration: none;
  border: 1.5px solid transparent;
  transition: transform 0.3s var(--ease), background 0.3s var(--ease), color 0.3s var(--ease), border-color 0.3s var(--ease);
}

.btn:hover {
  transform: translateY(-2px);
}

.btn--forest {
  background: var(--forest);
  color: var(--white);
  border-color: var(--forest);
}

.btn--forest:hover {
  background: var(--forest-deep);
  border-color: var(--forest-deep);
  color: var(--white);
}

.btn--soft {
  background: transparent;
  color: var(--forest);
  border-color: color-mix(in srgb, var(--forest) 35%, transparent);
}

.btn--soft:hover {
  border-color: var(--forest);
  color: var(--forest);
}

.btn--mist {
  background: var(--mist);
  color: var(--forest);
  border-color: var(--mist);
}

.btn--mist:hover {
  background: var(--white);
  color: var(--forest);
}

/* ——— HERO ——— */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(16rem, 0.85fr);
  min-height: calc(100svh - var(--top-h));
  min-height: calc(100vh - var(--top-h));
}

.hero__media {
  position: relative;
  overflow: hidden;
  min-height: 24rem;
}

.hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 45% center;
  position: absolute;
  inset: 0;
  transform: scale(1.05);
  animation: drift 24s var(--ease) infinite alternate;
  filter: saturate(0.9) contrast(1.04);
}

.hero__vertical {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  margin: 0;
  padding: 1.5rem 0.65rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.1rem, 2vw, 1.45rem);
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--white);
  background: color-mix(in srgb, var(--forest) 72%, transparent);
  display: flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  z-index: 2;
}

.hero__column {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(2rem, 6vh, 4rem) var(--pad);
  background: var(--white);
}

.hero__place {
  margin: 0 0 1rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--sage);
  opacity: 0;
  animation: lift 0.85s var(--ease) 0.1s forwards;
}

.hero__name {
  margin: 0 0 0.75rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.4rem, 5.5vw, 3.75rem);
  line-height: 0.95;
  letter-spacing: -0.03em;
  color: var(--forest);
  max-width: 10ch;
  opacity: 0;
  animation: lift 0.85s var(--ease) 0.22s forwards;
}

.hero__title {
  margin: 0 0 0.9rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.35rem, 2.8vw, 1.85rem);
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--ink);
  max-width: 14ch;
  opacity: 0;
  animation: lift 0.85s var(--ease) 0.36s forwards;
}

.hero__lede {
  margin: 0 0 1.65rem;
  font-weight: 300;
  font-size: 1.02rem;
  color: var(--muted);
  max-width: 30ch;
  opacity: 0;
  animation: lift 0.85s var(--ease) 0.48s forwards;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  opacity: 0;
  animation: lift 0.85s var(--ease) 0.58s forwards;
}

@keyframes lift {
  from {
    opacity: 0;
    transform: translateY(1.25rem);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes drift {
  from {
    transform: scale(1.05) translate3d(0, 0, 0);
  }
  to {
    transform: scale(1.1) translate3d(-1%, 1%, 0);
  }
}

/* ——— ABOUT sandwich ——— */
.about {
  padding: clamp(3.5rem, 9vh, 6rem) 0;
  max-width: calc(var(--max) + var(--pad) * 2);
  margin: 0 auto;
}

.about__lead,
.about__trail {
  padding: 0 var(--pad);
  max-width: 40rem;
}

.about__lead h2 {
  margin: 0 0 1rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.1rem, 4.5vw, 3.25rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: var(--forest);
  max-width: 14ch;
}

.about__lead > p,
.about__trail > p {
  margin: 0 0 1rem;
  color: var(--muted);
  max-width: 42ch;
}

.about__letterbox {
  margin: clamp(2rem, 5vh, 3rem) 0;
  width: 100%;
  overflow: hidden;
  aspect-ratio: 21 / 8;
  border-block: 1px solid color-mix(in srgb, var(--forest) 18%, transparent);
}

.about__letterbox img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 40%;
  filter: saturate(0.88) contrast(1.04);
}

.about__facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
  margin: 2rem 0 0;
  padding: 1.5rem 0 0;
  border-top: 1px solid color-mix(in srgb, var(--ink) 12%, transparent);
}

.about__facts dt {
  margin: 0 0 0.35rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--sage);
}

.about__facts dd {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
  line-height: 1.3;
  letter-spacing: -0.02em;
  color: var(--forest);
}

.about__facts a {
  text-decoration: none;
}

.about__facts a:hover {
  color: var(--sage);
}

/* ——— SERVICES staircase ——— */
.services {
  background: var(--forest-deep);
  color: var(--white);
  padding: clamp(3.5rem, 9vh, 6rem) 0 clamp(4rem, 10vh, 6.5rem);
  /* Soft top curve — different from prior cuts */
  border-radius: 3rem 0 0 0;
  margin-left: clamp(0.5rem, 3vw, 2rem);
}

.services__intro {
  padding: 0 var(--pad) clamp(2rem, 5vh, 3rem);
  max-width: calc(var(--max) + var(--pad) * 2);
}

.services__intro h2 {
  margin: 0 0 0.65rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2rem, 4.5vw, 3.15rem);
  letter-spacing: -0.03em;
  line-height: 1.05;
  max-width: 14ch;
}

.services__intro > p {
  margin: 0;
  font-weight: 300;
  color: color-mix(in srgb, var(--white) 68%, transparent);
  max-width: 34ch;
}

.stairs {
  list-style: none;
  margin: 0;
  padding: 0 var(--pad);
  max-width: calc(var(--max) + var(--pad) * 2);
  display: grid;
  gap: clamp(1.25rem, 3vh, 2rem);
}

.step {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(10rem, 0.8fr);
  gap: clamp(1rem, 3vw, 2rem);
  align-items: center;
  /* Staircase offset — unique cascade */
  margin-left: calc(var(--step) * clamp(0.75rem, 3vw, 2.75rem));
  padding: clamp(1.25rem, 3vh, 1.75rem) 0;
  border-top: 1px solid color-mix(in srgb, var(--white) 14%, transparent);
  opacity: 0;
  transform: translateY(1.25rem);
  transition: opacity 0.75s var(--ease), transform 0.75s var(--ease);
}

.step.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.step__n {
  display: block;
  margin-bottom: 0.45rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.35rem;
  color: var(--sage);
  letter-spacing: 0.04em;
}

.step__text h3 {
  margin: 0 0 0.45rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.35rem, 2.6vw, 1.85rem);
  letter-spacing: -0.02em;
}

.step__text p {
  margin: 0;
  font-weight: 300;
  font-size: 0.98rem;
  color: color-mix(in srgb, var(--white) 70%, transparent);
  max-width: 38ch;
}

.step__img {
  overflow: hidden;
  aspect-ratio: 5 / 3.5;
  /* Soft oval crop — different from prior clips */
  border-radius: 50% / 35%;
}

.step__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s var(--ease);
  filter: saturate(0.85) contrast(1.05);
}

.step:hover .step__img img {
  transform: scale(1.06);
}

.services__end {
  text-align: center;
  padding: clamp(3rem, 7vh, 4.5rem) var(--pad) 0;
  max-width: 32rem;
  margin: 0 auto;
}

.services__end > p:first-child {
  margin: 0 0 1.1rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.55rem;
  letter-spacing: -0.02em;
}

.services__end .btn {
  width: 100%;
  max-width: 28rem;
}

.services__addr {
  margin: 1.15rem 0 0;
  font-size: 0.9rem;
  color: color-mix(in srgb, var(--white) 60%, transparent);
}

.services__addr a {
  text-decoration: none;
}

.services__addr a:hover {
  color: var(--sage);
}

/* ——— Footer ——— */
.foot {
  padding: 2rem var(--pad) 2.5rem;
  display: grid;
  gap: 0.5rem;
  background: var(--mist);
}

.foot strong {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--forest);
}

.foot__row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.7rem;
  font-size: 0.88rem;
  color: var(--muted);
}

.foot__row a {
  text-decoration: none;
  font-weight: 600;
}

.foot__copy {
  margin: 0.4rem 0 0;
  font-size: 0.78rem;
  color: color-mix(in srgb, var(--ink) 42%, transparent);
}

/* Reveal */
.reveal {
  opacity: 0;
  transform: translateY(1.15rem);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ——— Responsive ——— */
@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .hero__media {
    min-height: 42vh;
    order: -1;
  }

  .hero__media img {
    position: relative;
    height: 44vh;
    min-height: 16rem;
  }

  .hero__vertical {
    padding: 1rem 0.5rem;
    font-size: 0.95rem;
    letter-spacing: 0.2em;
  }

  .about__facts {
    grid-template-columns: 1fr;
    gap: 1.1rem;
  }

  .about__letterbox {
    aspect-ratio: 16 / 8;
  }

  .services {
    margin-left: 0;
    border-radius: 2rem 2rem 0 0;
  }

  .step {
    grid-template-columns: 1fr;
    margin-left: calc(var(--step) * 0.5rem);
  }

  .step__img {
    max-width: 16rem;
    border-radius: 45% / 32%;
  }
}

@media (max-width: 640px) {
  .top {
    flex-wrap: wrap;
    height: auto;
    padding: 0.75rem var(--pad);
    gap: 0.5rem 1rem;
  }

  .top__nav {
    order: 3;
    width: 100%;
    margin-left: 0;
  }

  .top__call {
    margin-left: auto;
  }

  .hero__actions {
    flex-direction: column;
    align-items: stretch;
  }

  .step {
    margin-left: 0;
  }

  .foot__row {
    flex-direction: column;
    gap: 0.3rem;
  }

  .foot__row span[aria-hidden="true"] {
    display: none;
  }
}
