/* Thomas H. G. Stewart — homepage concept, Enigma Webs
   Art direction: Bruntsfield shop-front. Paper, limestone, Edinburgh green, copper.
   Not a Magic Circle template. */

@font-face {
  font-family: "Source Serif 4";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("../fonts/source-serif-4.woff2") format("woff2");
}
@font-face {
  font-family: "Source Serif 4";
  font-style: italic;
  font-weight: 400 700;
  font-display: swap;
  src: url("../fonts/source-serif-4-italic.woff2") format("woff2");
}
@font-face {
  font-family: "Figtree";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("../fonts/figtree.woff2") format("woff2");
}
@font-face {
  font-family: "Figtree";
  font-style: italic;
  font-weight: 400 700;
  font-display: swap;
  src: url("../fonts/figtree-italic.woff2") format("woff2");
}

:root {
  --limestone: #E8E0D4;
  --green: #1C3A32;
  --green-deep: #122722;
  --copper: #9C5A3C;
  --copper-deep: #7A4430;
  --ink: #1B1814;
  --paper: #FBF7F0;
  --paper-2: #F3EBE0;
  --muted: #5C5349;
  --line: color-mix(in srgb, var(--ink) 12%, transparent);
  --copper-line: color-mix(in srgb, var(--copper) 42%, transparent);
  --serif: "Source Serif 4", "Iowan Old Style", "Palatino Linotype", Palatino, "Times New Roman", serif;
  --sans: "Figtree", "Nunito Sans", "Segoe UI", system-ui, sans-serif;
  --space: clamp(1.15rem, 0.7rem + 1.6vw, 2.4rem);
  --gutter: clamp(1.15rem, 0.55rem + 3vw, 3.5rem);
  --measure: 72rem;
  --radius: 2px;
  --shadow: 0 18px 40px color-mix(in srgb, var(--ink) 12%, transparent);
}

*, *::before, *::after { box-sizing: border-box; }
html {
  color-scheme: light;
  scroll-behavior: smooth;
  hanging-punctuation: first last;
}
html:focus-within { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(1200px 500px at 10% -10%, color-mix(in srgb, var(--limestone) 70%, white), transparent 50%),
    var(--paper);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  font-weight: 400;
  letter-spacing: 0.005em;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--copper-deep); text-underline-offset: 0.18em; }
a:hover { color: var(--green); }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, .display {
  font-family: var(--serif);
  font-weight: 600;
  letter-spacing: -0.018em;
  line-height: 1.12;
  text-wrap: balance;
}
p { text-wrap: pretty; }
:focus { outline: none; }
:focus-visible {
  outline: 2px solid var(--copper);
  outline-offset: 3px;
}
::selection {
  background: color-mix(in srgb, var(--green) 88%, black);
  color: var(--paper);
}

.skip {
  position: absolute;
  left: 0.75rem;
  top: -4rem;
  z-index: 80;
  background: var(--green);
  color: var(--paper);
  padding: 0.7rem 1rem;
  text-decoration: none;
  min-height: 44px;
}
.skip:focus { top: 0.75rem; }

.wrap {
  width: min(100% - (var(--gutter) * 2), var(--measure));
  margin-inline: auto;
}

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  margin: 0 0 0.85rem;
  color: var(--copper-deep);
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.kicker::before {
  content: "";
  width: 1.4rem;
  height: 1px;
  background: var(--copper);
}

/* Concept bar */
.concept {
  background: var(--green);
  color: var(--limestone);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-align: center;
  padding: 0.45rem 1rem;
  min-height: 28px;
}

/* Header */
.mast {
  position: sticky;
  top: 0;
  z-index: 40;
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.mast__inner {
  width: min(100% - (var(--gutter) * 2), var(--measure));
  margin-inline: auto;
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-areas:
    "brand tel"
    "nav nav";
  gap: 0.35rem 1rem;
  align-items: center;
  padding: 0.7rem 0 0.55rem;
}
.brand {
  grid-area: brand;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: inherit;
  min-height: 44px;
}
.brand__mark {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1.5px solid var(--copper);
  color: var(--copper);
  font-family: var(--serif);
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1;
}
.brand__name {
  display: block;
  font-family: var(--serif);
  font-size: clamp(1.05rem, 0.9rem + 0.7vw, 1.35rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.15;
}
.brand__role {
  display: block;
  margin-top: 0.12rem;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.mast__tel {
  grid-area: tel;
  justify-self: end;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 44px;
  padding: 0 0.15rem;
  color: var(--green);
  font-weight: 600;
  letter-spacing: 0.02em;
  text-decoration: none;
  white-space: nowrap;
}
.mast__tel svg { width: 18px; height: 18px; flex: 0 0 auto; }
.mast__tel:hover { color: var(--copper-deep); }
.nav {
  grid-area: nav;
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem 0.1rem;
  padding-top: 0.15rem;
  border-top: 1px solid var(--line);
}
.nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 0.7rem;
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 550;
  text-decoration: none;
}
.nav a:hover { color: var(--copper-deep); }

@media (min-width: 980px) {
  .mast__inner {
    grid-template-columns: auto 1fr auto;
    grid-template-areas: "brand nav tel";
    padding: 0.55rem 0;
  }
  .nav {
    justify-content: flex-end;
    border-top: 0;
    padding-top: 0;
    padding-inline: 1rem;
  }
}

/* Hero */
.hero {
  padding: clamp(1.8rem, 1.2rem + 3vw, 4.2rem) 0 clamp(2.2rem, 1.4rem + 3vw, 4.6rem);
}
.hero__grid {
  display: grid;
  gap: 1.75rem;
}
.hero h1 {
  margin: 0 0 1rem;
  font-size: clamp(2.15rem, 1.15rem + 4.2vw, 4.35rem);
  font-weight: 600;
  max-width: 14ch;
}
.hero h1 em {
  font-style: italic;
  font-weight: 500;
  color: var(--green);
}
.lede {
  margin: 0 0 1.5rem;
  max-width: 38rem;
  color: var(--muted);
  font-size: clamp(1.02rem, 0.95rem + 0.4vw, 1.18rem);
  line-height: 1.55;
}
.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.75rem 1.25rem;
  border: 1.5px solid transparent;
  border-radius: var(--radius);
  font-weight: 600;
  letter-spacing: 0.01em;
  text-decoration: none;
  cursor: pointer;
}
.btn--green {
  background: var(--green);
  color: var(--paper);
}
.btn--green:hover { background: var(--green-deep); color: var(--paper); }
.btn--copper {
  background: transparent;
  border-color: var(--copper);
  color: var(--copper-deep);
}
.btn--copper:hover {
  background: var(--copper);
  color: var(--paper);
}
.btn--paper {
  background: var(--paper);
  color: var(--green);
  border-color: color-mix(in srgb, var(--paper) 40%, transparent);
}
.btn--paper:hover { background: var(--limestone); color: var(--green-deep); }
.btn--ghost {
  background: transparent;
  border-color: color-mix(in srgb, var(--ink) 22%, transparent);
  color: var(--ink);
}
.btn--ghost:hover { border-color: var(--copper); color: var(--copper-deep); }

.plate {
  position: relative;
  margin: 0;
}
.plate img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  box-shadow: var(--shadow);
}
.plate figcaption {
  margin-top: 0.65rem;
  color: var(--muted);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
}
@media (min-width: 880px) {
  .hero__grid {
    grid-template-columns: 1.15fr 0.85fr;
    align-items: end;
    gap: 3.5rem;
    min-height: min(70vh, 40rem);
  }
  .plate img { aspect-ratio: 4 / 5.1; }
  .hero .cta-row { margin-top: 0.4rem; }
}

/* Quote band */
.band {
  background: var(--green);
  color: var(--limestone);
  padding: 1.6rem var(--gutter);
}
.band p {
  width: min(100%, 52rem);
  margin: 0 auto;
  font-family: var(--serif);
  font-size: clamp(1.25rem, 1rem + 1.3vw, 1.85rem);
  font-style: italic;
  font-weight: 500;
  line-height: 1.35;
  text-align: center;
  text-wrap: balance;
}

/* Two doors */
.doors {
  display: grid;
  background: var(--limestone);
  border-block: 1px solid var(--line);
}
.door {
  background: var(--limestone);
  padding: clamp(1.8rem, 1.2rem + 2.5vw, 3.4rem) var(--gutter) 2.6rem;
}
.door + .door {
  border-top: 1px solid color-mix(in srgb, var(--ink) 14%, transparent);
}
.door h2 {
  margin: 0 0 0.8rem;
  font-size: clamp(1.8rem, 1.3rem + 1.6vw, 2.55rem);
}
.door .intro {
  margin: 0 0 1.2rem;
  max-width: 36rem;
  color: color-mix(in srgb, var(--ink) 78%, var(--muted));
}
.door .plate { margin: 1.3rem 0 1.4rem; }
.door .plate img { aspect-ratio: 5 / 4; box-shadow: none; }
.list {
  list-style: none;
  margin: 0 0 1.4rem;
  padding: 0;
  max-width: 34rem;
}
.list li {
  position: relative;
  display: block;
  padding: 0.72rem 0 0.72rem 1.6rem;
  border-top: 1px solid color-mix(in srgb, var(--ink) 12%, transparent);
  font-size: 1.02rem;
}
.list li:last-child { border-bottom: 1px solid color-mix(in srgb, var(--ink) 12%, transparent); }
.list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.72rem;
  width: 0.55rem;
  height: 0.55rem;
  margin-top: 0.45rem;
  border: 1px solid var(--copper);
  border-radius: 50%;
}
.list a { display: inline; color: inherit; font-weight: 600; text-decoration: none; }
.list a:hover { color: var(--copper-deep); text-decoration: underline; }
.door__actions { display: flex; flex-wrap: wrap; gap: 0.65rem; }

@media (min-width: 900px) {
  .doors {
    grid-template-columns: 1fr 1fr;
    width: min(100%, calc(var(--measure) + 8rem));
    margin-inline: auto;
  }
  .door {
    padding: 3.2rem clamp(1.6rem, 1rem + 2vw, 3.4rem) 3.4rem;
  }
  .door + .door {
    border-top: 0;
    border-left: 1px solid color-mix(in srgb, var(--ink) 16%, transparent);
  }
}

/* Firm */
.firm {
  padding: clamp(2.4rem, 1.6rem + 4vw, 5.2rem) 0;
}
.firm__grid {
  display: grid;
  gap: 1.8rem;
}
.firm h2 {
  margin: 0 0 0.9rem;
  font-size: clamp(1.9rem, 1.3rem + 2vw, 3rem);
  max-width: 16ch;
}
.firm p {
  margin: 0 0 1rem;
  max-width: 40rem;
  color: var(--muted);
}
.firm p:last-of-type { margin-bottom: 0; }
.firm .plate img { aspect-ratio: 3 / 2; }
@media (min-width: 900px) {
  .firm__grid {
    grid-template-columns: 0.95fr 1.05fr;
    gap: 3.4rem;
    align-items: center;
  }
}

/* Find */
.find {
  background: var(--green-deep);
  color: var(--limestone);
  padding: clamp(2.4rem, 1.6rem + 4vw, 5rem) 0;
}
.find .kicker { color: color-mix(in srgb, var(--limestone) 80%, var(--copper)); }
.find .kicker::before { background: var(--copper); }
.find h2 {
  margin: 0 0 0.6rem;
  font-size: clamp(1.9rem, 1.3rem + 2vw, 3rem);
  color: var(--paper);
}
.find__grid {
  display: grid;
  gap: 1.8rem;
}
.address {
  margin: 0 0 1.2rem;
  font-family: var(--serif);
  font-size: clamp(1.25rem, 1rem + 1vw, 1.7rem);
  font-style: normal;
  font-weight: 500;
  line-height: 1.35;
  color: var(--paper);
}
.address span { display: block; }
.find p { margin: 0 0 1.1rem; max-width: 34rem; color: color-mix(in srgb, var(--limestone) 82%, white); }
.find a:not(.btn) { color: var(--paper); }
.find a:not(.btn):hover { color: var(--limestone); }
.contacts {
  list-style: none;
  margin: 0 0 1.4rem;
  padding: 0;
}
.contacts li { margin: 0; }
.contacts a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-weight: 600;
  text-decoration: none;
  letter-spacing: 0.01em;
}
.find .plate img {
  aspect-ratio: 3 / 4;
  box-shadow: none;
  filter: saturate(0.9) contrast(1.04);
}
.find figcaption { color: color-mix(in srgb, var(--limestone) 72%, white); }
@media (min-width: 880px) {
  .find__grid {
    grid-template-columns: 1.05fr 0.95fr;
    gap: 3.6rem;
    align-items: center;
  }
  .find .plate img { aspect-ratio: 4 / 5; }
}

/* Enquire */
.enquire {
  padding: clamp(2.4rem, 1.6rem + 4vw, 5rem) 0 4rem;
}
.enquire__grid {
  display: grid;
  gap: 1.6rem;
}
.enquire h2 {
  margin: 0 0 0.7rem;
  font-size: clamp(1.9rem, 1.3rem + 2vw, 3rem);
}
.enquire .intro { margin: 0; max-width: 36rem; color: var(--muted); }
.blotter {
  background: var(--limestone);
  padding: 1.25rem;
  border: 1px solid var(--line);
}
.form {
  display: grid;
  gap: 0.95rem;
}
.field { display: grid; gap: 0.35rem; }
.field label {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--green);
}
.req { color: var(--copper-deep); }
.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 48px;
  padding: 0.7rem 0.8rem;
  border: 1px solid color-mix(in srgb, var(--ink) 18%, transparent);
  border-radius: var(--radius);
  background: var(--paper);
}
.field textarea { min-height: 8.5rem; resize: vertical; }
.field input:hover,
.field select:hover,
.field textarea:hover { border-color: color-mix(in srgb, var(--ink) 38%, transparent); }
.field input:focus-visible,
.field select:focus-visible,
.field textarea:focus-visible {
  outline: 2px solid var(--copper);
  outline-offset: 1px;
  border-color: var(--copper);
}
.form__row {
  display: grid;
  gap: 0.95rem;
}
.form button { width: fit-content; }
.note {
  margin: 0.2rem 0 0;
  color: var(--muted);
  font-size: 0.88rem;
}
.success {
  display: none;
  padding: 1.4rem 0.2rem 0.4rem;
}
.success.is-visible { display: block; }
.form.is-hidden { display: none; }
.success h3 {
  margin: 0 0 0.5rem;
  font-size: 1.7rem;
}
.success p { margin: 0 0 0.7rem; color: var(--muted); }
@media (min-width: 720px) {
  .form__row { grid-template-columns: 1fr 1fr; }
  .blotter { padding: 1.7rem 1.8rem; }
}
@media (min-width: 900px) {
  .enquire__grid {
    grid-template-columns: 0.85fr 1.15fr;
    gap: 3rem;
    align-items: start;
  }
}

/* Footer */
.foot {
  background: var(--ink);
  color: color-mix(in srgb, var(--limestone) 78%, white);
  padding: 1.6rem 0 2rem;
  font-size: 0.92rem;
}
.foot__inner {
  width: min(100% - (var(--gutter) * 2), var(--measure));
  margin-inline: auto;
  display: grid;
  gap: 0.6rem;
}
.foot strong {
  color: var(--paper);
  font-family: var(--serif);
  font-weight: 600;
}
.foot a { color: var(--paper); text-decoration: none; }
.foot a:hover { color: var(--limestone); text-decoration: underline; }
.foot p { margin: 0; }

@media (min-width: 720px) {
  .foot__inner {
    grid-template-columns: 1fr auto;
    align-items: end;
  }
  .foot .tel { text-align: right; }
}

/* Motion */
@media (prefers-reduced-motion: reduce) {
  html, html:focus-within { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

@media (max-width: 379px) {
  .brand__role { display: none; }
  .mast__tel { font-size: 0.95rem; }
}

/* Anchors sit clear of the sticky header */
#legal, #property, #firm, #find, #enquire {
  scroll-margin-top: 7.2rem;
}

.hero h1 {
  padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--copper-line);
  margin-bottom: 1.15rem;
}

.plate img {
  object-position: 50% 50%;
}
.hero .plate img { object-position: 50% 62%; }
#legal .plate img { object-position: 50% 70%; }
#property .plate img { object-position: 50% 40%; }
#firm .plate img { object-position: 42% 50%; }
#find .plate img { object-position: 50% 28%; }

.field select {
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--copper) 50%),
    linear-gradient(135deg, var(--copper) 50%, transparent 50%);
  background-position:
    calc(100% - 18px) calc(50% - 3px),
    calc(100% - 12px) calc(50% - 3px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  padding-right: 2.2rem;
}

@media (min-width: 900px) {
  .doors {
    width: 100%;
    margin-inline: 0;
  }
  .door {
    padding: 3.4rem clamp(1.6rem, 5vw, 5.5rem) 3.8rem;
  }
  #legal, #property, #firm, #find, #enquire {
    scroll-margin-top: 5.6rem;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .btn { transition: background-color 160ms ease, color 160ms ease, border-color 160ms ease; }
  .nav a, .mast__tel, .brand { transition: color 160ms ease; }
}
