/* Shepherd Estate Ironworks */

:root {
  --cream: #f5f3ec;
  --cream-deep: #ebe8de;
  --stone: #d6d8cc;
  --sage: #718176;
  --moss: #686e62;
  --green: #263c33;
  --green-deep: #1b2b24;
  --ink: #1f2a24;
  --white: #fffdf8;

  --serif: "Baskervville", "Baskerville", Georgia, serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;

  --wrap: 1200px;
  --gutter: clamp(16px, 4vw, 40px);
  --section: clamp(72px, 10vw, 140px);
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

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

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3, p { margin: 0; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }

.eyebrow {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--sage);
}

.display {
  font-family: var(--serif);
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: -.02em;
  color: var(--green);
}

.skip {
  position: absolute; left: -9999px; top: 8px;
  background: var(--green); color: var(--cream); padding: 8px 14px; z-index: 100;
}
.skip:focus { left: 8px; }

:focus-visible { outline: 2px solid var(--sage); outline-offset: 3px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 15px 26px;
  border: 1px solid var(--green);
  background: var(--green); color: var(--cream);
  font: 500 14px/1 var(--sans); letter-spacing: .04em;
  text-decoration: none; cursor: pointer;
  transition: background .25s, color .25s, border-color .25s;
}
.btn:hover { background: var(--green-deep); border-color: var(--green-deep); }
.btn--ghost { background: transparent; color: var(--green); }
.btn--ghost:hover { background: var(--green); color: var(--cream); }
.btn--light { background: var(--cream); color: var(--green); border-color: var(--cream); }
.btn--light:hover { background: transparent; color: var(--cream); }
.btn .arrow { transition: transform .25s; }
.btn:hover .arrow { transform: translateX(4px); }

.link-arrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 14px; font-weight: 500; letter-spacing: .04em;
  color: var(--green); text-decoration: none;
  border-bottom: 1px solid currentColor; padding-bottom: 4px;
}
.link-arrow:hover .arrow { transform: translateX(4px); }
.link-arrow .arrow { transition: transform .25s; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(245, 243, 236, .92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s;
}
.site-header.is-scrolled { border-bottom-color: var(--stone); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 76px; gap: 24px; }

/* Logo: the box is as wide as "ESTATE IRONWORKS"; the letters of SHEPHERD spread to fill it exactly */
.brand { display: inline-flex; flex-direction: column; text-decoration: none; color: var(--green); line-height: 1.2; }
.brand__name { display: flex; justify-content: space-between; font-family: var(--serif); font-size: 20px; }
.brand__sub { display: block; font-size: 10px; letter-spacing: .2em; margin-right: -.2em; color: var(--sage); margin-top: 3px; white-space: nowrap; }

.nav { display: flex; align-items: center; gap: 36px; }
.nav a:not(.btn) {
  font-size: 14px; text-decoration: none; color: var(--moss);
  position: relative; padding: 4px 0;
}
.nav a:not(.btn)::after {
  content: ""; position: absolute; left: 0; right: 100%; bottom: 0;
  height: 1px; background: var(--green); transition: right .3s;
}
.nav a:not(.btn):hover, .nav a[aria-current="page"] { color: var(--green); }
.nav a:not(.btn):hover::after, .nav a[aria-current="page"]::after { right: 0; }
.nav .btn { padding: 12px 20px; font-size: 13px; }

.nav-toggle {
  display: none; background: none; border: 0; padding: 10px; margin-right: -10px; cursor: pointer;
  color: var(--green);
}
.nav-toggle span { display: block; width: 22px; height: 1.5px; background: currentColor; transition: transform .3s, opacity .3s; }
.nav-toggle span + span { margin-top: 6px; }
.nav-open .nav-toggle span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

@media (max-width: 760px) {
  .nav-toggle { display: block; }
  .nav {
    position: fixed; inset: 76px 0 0 0;
    flex-direction: column; align-items: flex-start; gap: 0;
    background: var(--cream); padding: 24px var(--gutter);
    transform: translateY(-8px); opacity: 0; visibility: hidden;
    transition: opacity .25s, transform .25s, visibility .25s;
  }
  .nav-open .nav { transform: none; opacity: 1; visibility: visible; }
  .nav a:not(.btn) { font-family: var(--serif); font-size: 32px; color: var(--green); padding: 10px 0; }
  .nav a:not(.btn)::after { display: none; }
  .nav .btn { margin-top: 24px; }
  .nav-open { overflow: hidden; }
}

/* Hero */
.hero { padding: clamp(48px, 8vw, 112px) 0 clamp(48px, 6vw, 80px); }
.hero__grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(32px, 6vw, 88px); align-items: end; }
.hero h1 { font-size: clamp(44px, 6.4vw, 84px); margin: 22px 0 28px; }
.hero__lead { font-size: 18px; color: var(--moss); max-width: 30em; margin-bottom: 36px; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px 28px; align-items: center; }
.hero__media { aspect-ratio: 4 / 5; overflow: hidden; background: var(--stone); }
.hero__media img { width: 100%; height: 100%; object-fit: cover; }

@media (max-width: 860px) {
  .hero__grid { grid-template-columns: 1fr; }
  .hero__media { aspect-ratio: 3 / 2; order: -1; }
}

/* Feature band */
.band { background: var(--green); color: var(--cream); }
.band__media { aspect-ratio: 16 / 8; overflow: hidden; background: var(--stone); }
.band__media img { width: 100%; height: 100%; object-fit: cover; object-position: center 85%; }
.band__caption { padding: clamp(32px, 5vw, 56px) 0; }
.band__caption .wrap { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 48px; }
.band h2 { font-family: var(--serif); font-weight: 400; font-size: clamp(30px, 4.4vw, 56px); line-height: 1.08; letter-spacing: -.02em; max-width: 14em; }
.band .eyebrow { color: var(--stone); padding-bottom: 10px; }
@media (max-width: 760px) {
  .band__media { aspect-ratio: 4 / 3; }
  .band__media img { object-position: 30% center; }
  .band__caption .wrap { flex-direction: column-reverse; align-items: flex-start; }
}

/* Ironwork */
.section { padding: var(--section) 0; }
.section-head { display: grid; grid-template-columns: 1fr 1fr; gap: 32px 64px; align-items: end; margin-bottom: clamp(40px, 6vw, 72px); }
.section-head h2 { font-size: clamp(34px, 4.4vw, 56px); margin-top: 18px; }
.section-head p { color: var(--moss); max-width: 30em; }
@media (max-width: 760px) { .section-head { grid-template-columns: 1fr; } }

.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(20px, 3vw, 36px); }
.card { display: flex; flex-direction: column; }
.card__media { aspect-ratio: 4 / 5; overflow: hidden; background: var(--stone); margin-bottom: 24px; }
.card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s cubic-bezier(.2,.7,.2,1); }
.card:hover .card__media img { transform: scale(1.04); }
.card__num { font-family: var(--serif); font-size: 15px; color: var(--sage); border-top: 1px solid var(--stone); padding-top: 18px; }
.card h3 { font-family: var(--serif); font-weight: 400; font-size: 28px; color: var(--green); margin: 8px 0 12px; letter-spacing: -.01em; }
.card p { color: var(--moss); font-size: 15px; }
.section-foot { margin-top: clamp(40px, 5vw, 64px); }

@media (max-width: 900px) {
  .cards { grid-template-columns: 1fr; }
  .card { display: grid; grid-template-columns: 2fr 3fr; gap: 0 24px; }
  .card__media { aspect-ratio: 1; margin: 0; grid-row: span 3; }
}
@media (max-width: 520px) {
  .card { display: flex; }
  .card__media { aspect-ratio: 3 / 2; margin-bottom: 20px; }
}

/* Coverage strip */
.strip { background: var(--green); color: var(--stone); padding: 22px 0; overflow: hidden; }
.strip .wrap { display: flex; justify-content: center; text-align: center; }
.strip p { font-size: 12px; letter-spacing: .22em; text-transform: uppercase; }

/* Contact */
.contact { background: var(--cream-deep); }
.contact__grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(40px, 7vw, 104px); }
.contact h2 { font-size: clamp(36px, 4.6vw, 60px); margin: 18px 0 24px; }
.contact__intro p { color: var(--moss); max-width: 28em; }

.methods { list-style: none; padding: 0; margin: 40px 0 0; border-top: 1px solid var(--stone); }
.methods li { border-bottom: 1px solid var(--stone); }
.methods a, .methods .method {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 20px 0; text-decoration: none;
}
.methods .label { font-family: var(--serif); font-size: 22px; color: var(--green); }
.methods .value { font-size: 14px; color: var(--moss); text-align: right; }
.methods a:hover .value { color: var(--green); }

.form { background: var(--white); padding: clamp(24px, 4vw, 48px); border: 1px solid var(--stone); }
.form h3 { font-family: var(--serif); font-weight: 400; font-size: 26px; color: var(--green); margin-bottom: 6px; }
.form > p { color: var(--moss); font-size: 14px; margin-bottom: 28px; }
.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field--full { grid-column: 1 / -1; }
.field label { font-size: 12px; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; color: var(--moss); }
.field input, .field select, .field textarea {
  font: inherit; font-size: 16px; color: var(--ink);
  background: var(--cream); border: 1px solid var(--stone); border-radius: 0;
  padding: 13px 14px; width: 100%;
  transition: border-color .2s, background .2s;
  -webkit-appearance: none; appearance: none;
}
.field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' stroke='%23686e62' stroke-width='1.5'%3E%3Cpath d='M1 1.5l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; padding-right: 40px;
}
.field textarea { min-height: 130px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--green); background: var(--white); }
.field .hint { font-size: 13px; color: var(--sage); }
.form .btn { margin-top: 26px; width: 100%; justify-content: center; }
.form .small { font-size: 13px; color: var(--sage); margin-top: 14px; text-align: center; }

@media (max-width: 860px) { .contact__grid { grid-template-columns: 1fr; } }
@media (max-width: 520px) { .fields { grid-template-columns: 1fr; } }

/* Footer */
.site-footer { background: var(--green-deep); color: var(--stone); padding: 56px 0 40px; font-size: 14px; }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 24px 48px; align-items: flex-end; }
.site-footer .brand { color: var(--cream); }
.site-footer .brand__sub { color: var(--sage); }
.site-footer nav { display: flex; gap: 28px; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: var(--cream); }
.site-footer small { display: block; width: 100%; color: var(--sage); border-top: 1px solid rgba(214,216,204,.15); padding-top: 24px; margin-top: 8px; font-size: 13px; }

/* Page intro (gallery etc.) */
.page-intro { padding: clamp(56px, 8vw, 112px) 0 clamp(32px, 4vw, 56px); }
.page-intro h1 { font-size: clamp(44px, 6vw, 80px); margin: 20px 0 22px; }
.page-intro p { color: var(--moss); font-size: 18px; max-width: 32em; }

/* Gallery */
.filters { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 36px; }
.filter {
  font: 500 13px/1 var(--sans); letter-spacing: .04em;
  padding: 11px 18px; cursor: pointer;
  background: transparent; color: var(--moss); border: 1px solid var(--stone);
  transition: all .2s;
}
.filter:hover { border-color: var(--green); color: var(--green); }
.filter[aria-pressed="true"] { background: var(--green); border-color: var(--green); color: var(--cream); }

.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(12px, 2vw, 24px); }
.gallery__item { margin: 0; }
.gallery__item[hidden] { display: none; }
.gallery__item button { display: block; width: 100%; padding: 0; border: 0; background: var(--stone); cursor: zoom-in; overflow: hidden; aspect-ratio: 4 / 5; }
.gallery__item:nth-child(6n+1) button, .gallery__item:nth-child(6n+5) button { aspect-ratio: 4 / 3; }
.gallery__item img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s cubic-bezier(.2,.7,.2,1); }
.gallery__item button:hover img { transform: scale(1.04); }
.gallery__item figcaption { display: flex; justify-content: space-between; gap: 12px; padding: 12px 0 0; font-size: 14px; color: var(--green); }
.gallery__item figcaption span { color: var(--sage); font-size: 13px; }

@media (max-width: 900px) { .gallery { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .gallery { grid-template-columns: 1fr; } .gallery__item button { aspect-ratio: 4 / 3 !important; } }

.lightbox { border: 0; padding: 0; background: transparent; max-width: min(1100px, 94vw); max-height: 92vh; }
.lightbox::backdrop { background: rgba(27, 43, 36, .9); }
.lightbox img { max-height: 82vh; width: auto; margin: 0 auto; }
.lightbox p { color: var(--cream); text-align: center; margin-top: 12px; font-size: 14px; }
.lightbox__close {
  position: fixed; top: 16px; right: 16px; width: 44px; height: 44px;
  background: var(--cream); color: var(--green); border: 0; font-size: 22px; cursor: pointer;
}

.cta { background: var(--green); color: var(--cream); text-align: center; }
.cta h2 { font-family: var(--serif); font-weight: 400; font-size: clamp(32px, 4.4vw, 56px); line-height: 1.1; letter-spacing: -.02em; margin: 18px auto 32px; max-width: 14em; }
.cta .eyebrow { color: var(--stone); }

/* Simple centred pages */
.simple { min-height: 60vh; display: flex; align-items: center; text-align: center; padding: var(--section) 0; }
.simple h1 { font-size: clamp(40px, 5vw, 64px); margin: 18px 0 20px; }
.simple p { color: var(--moss); max-width: 30em; margin: 0 auto 32px; }

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .9s ease, transform .9s cubic-bezier(.2,.7,.2,1); }
.reveal.is-visible { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  * { transition-duration: 0s !important; }
}

/* Quote form: sending, error and success states */
.btn__sending { display: none; align-items: center; gap: 10px; }
.form.is-sending .btn__label { display: none; }
.form.is-sending .btn__sending { display: inline-flex; }
.form.is-sending .btn { cursor: progress; opacity: .85; }
.spinner {
  width: 14px; height: 14px; border-radius: 50%;
  border: 1.5px solid rgba(245, 243, 236, .35); border-top-color: var(--cream);
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.form__error { margin-top: 16px; font-size: 14px; color: #8a3b2e; text-align: center; }
.form__error a { color: inherit; }

.form.is-sent > :not(.form__success) { display: none !important; }
.form__success {
  text-align: center; padding: clamp(24px, 5vw, 56px) 0;
  animation: fade-up .6s .1s cubic-bezier(.2,.7,.2,1) both;
}
.form__success:focus { outline: none; }
.form__success h3 { font-family: var(--serif); font-weight: 400; font-size: 34px; color: var(--green); margin: 22px 0 10px; }
.form__success p { color: var(--moss); max-width: 24em; margin: 0 auto; }
.form__success .form__success-alt { font-size: 14px; color: var(--sage); margin-top: 18px; }
.form__success a { color: var(--green); }

.tick { width: 76px; height: 76px; margin: 0 auto; display: block; }
.tick__circle {
  stroke: var(--green); stroke-width: 1.5;
  stroke-dasharray: 151; stroke-dashoffset: 151;
  animation: draw .7s cubic-bezier(.65,0,.45,1) forwards;
}
.tick__check {
  stroke: var(--green); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: 36; stroke-dashoffset: 36;
  animation: draw .45s .6s cubic-bezier(.65,0,.45,1) forwards;
}
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes fade-up { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  .tick__circle, .tick__check { animation: none; stroke-dashoffset: 0; }
  .form__success { animation: none; }
  .spinner { animation-duration: 2s; }
}

/* Long-form text (privacy notice) */
.prose .wrap > * { max-width: 680px; }
.prose h2 { font-family: var(--serif); font-weight: 400; font-size: 28px; color: var(--green); margin: 48px 0 14px; letter-spacing: -.01em; }
.prose h2:first-child { margin-top: 0; }
.prose p, .prose li { color: var(--moss); }
.prose p + p { margin-top: 14px; }
.prose ul { padding-left: 20px; margin: 14px 0; }
.prose li + li { margin-top: 8px; }
.prose strong { color: var(--ink); font-weight: 500; }
.prose a { color: var(--green); }

.form__privacy { font-size: 13px; color: var(--sage); margin-top: 14px; text-align: center; }
.form__privacy a { color: inherit; }

.site-footer small a { color: var(--sage); margin-left: 16px; }
