/* =========================================================
   Michael Hughes — North East Property Consultant
   Premium, minimalist brochure site
   ========================================================= */

/* ----- Design tokens ----- */
:root {
  --bg:          #F4F1EA;   /* warm off-white / stone   */
  --bg-alt:      #ECE7DD;   /* deeper stone for bands   */
  --paper:       #FCFBF8;   /* elevated surfaces        */
  --ink:         #1B1C19;   /* charcoal, near-black     */
  --ink-soft:    #43453F;   /* softened headings/body   */
  --muted:       #76776F;   /* secondary text           */
  --line:        #D9D3C7;   /* hairline borders         */
  --line-soft:   #E5E0D6;
  --accent:      #21403A;   /* deep green               */
  --accent-deep: #18302B;
  --accent-tint: #335E54;
  --accent-soft: #ECF0EC;

  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans:  "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  --container: 1200px;
  --pad: clamp(1.25rem, 5vw, 2.5rem);
  --section-y: clamp(4.5rem, 10vw, 9rem);
  --radius: 4px;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --dur: 0.6s;
}

/* ----- Reset ----- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--ink-soft);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; padding: 0; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, textarea { font: inherit; color: inherit; }

::selection { background: var(--accent); color: var(--bg); }

/* ----- Typography ----- */
h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 400;
  color: var(--ink);
  line-height: 1.08;
  letter-spacing: -0.01em;
  font-optical-sizing: auto;
}
h1 { font-size: clamp(2.55rem, 6vw, 5rem); }
h2 { font-size: clamp(1.9rem, 4vw, 3.1rem); letter-spacing: -0.015em; }
h3 { font-size: 1.3rem; letter-spacing: -0.01em; }
em { font-style: italic; }

p { text-wrap: pretty; }

.eyebrow {
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent-tint);
  margin-bottom: 1.4rem;
}
.eyebrow-light { color: rgba(255,255,255,0.65); }

.lead { font-size: 1.15rem; color: var(--ink-soft); }

/* ----- Layout helpers ----- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--pad);
}
.section { padding-block: var(--section-y); }
.section-head { max-width: 46rem; margin-bottom: clamp(2.5rem, 5vw, 4rem); }
.section-intro { color: var(--muted); margin-top: 1.1rem; max-width: 40rem; }

/* ----- Accessibility ----- */
.skip-link {
  position: absolute;
  left: 1rem; top: -100px;
  background: var(--accent);
  color: var(--bg);
  padding: 0.6rem 1rem;
  border-radius: var(--radius);
  z-index: 1000;
  transition: top 0.2s var(--ease);
}
.skip-link:focus { top: 1rem; }

:focus-visible {
  outline: 2px solid var(--accent-tint);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ----- Buttons ----- */
.btn {
  --btn-bg: var(--accent);
  --btn-fg: var(--bg);
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.95rem 1.7rem;
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  border-radius: var(--radius);
  position: relative;
  overflow: hidden;
  isolation: isolate;
  transition: transform 0.45s var(--ease), color 0.4s var(--ease), border-color 0.4s var(--ease);
  white-space: nowrap;
}
.btn-arrow { transition: transform 0.4s var(--ease); }

.btn-primary { background: var(--btn-bg); color: var(--btn-fg); }
.btn-primary::before {
  content: "";
  position: absolute; inset: 0;
  background: var(--accent-deep);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.45s var(--ease);
  z-index: -1;
}
.btn-primary:hover::before { transform: scaleX(1); }
.btn-primary:hover { transform: translateY(-2px); }

.btn-ghost {
  color: var(--ink);
  border: 1px solid var(--line);
  background: transparent;
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn-ghost:hover .btn-arrow { transform: translateX(4px); }

.btn-light {
  background: var(--bg);
  color: var(--accent);
}
.btn-light::before {
  content: "";
  position: absolute; inset: 0;
  background: #fff;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.45s var(--ease);
  z-index: -1;
}
.btn-light:hover::before { transform: scaleX(1); }
.btn-light:hover { transform: translateY(-2px); }

.btn-block { width: 100%; justify-content: center; }

/* =========================================================
   Header
   ========================================================= */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  transition: background 0.4s var(--ease), box-shadow 0.4s var(--ease), border-color 0.4s var(--ease);
  border-bottom: 1px solid transparent;
}
.site-header.scrolled {
  background: rgba(244, 241, 234, 0.82);
  backdrop-filter: saturate(140%) blur(12px);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  border-bottom-color: var(--line);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 78px;
}

.brand { display: inline-flex; align-items: center; gap: 0.7rem; }
.brand-mark {
  display: grid;
  place-items: center;
  width: 40px; height: 40px;
  border: 1px solid var(--accent);
  color: var(--accent);
  font-family: var(--serif);
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  border-radius: 50%;
  flex: none;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-name { font-family: var(--serif); font-size: 1.12rem; color: var(--ink); }
.brand-sub {
  font-size: 0.62rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}
@media (max-width: 559px) {
  .brand-sub { display: none; }
}

.nav { display: none; align-items: center; gap: 2.2rem; }
.nav-list { display: flex; gap: 1.9rem; }
.nav-list a {
  font-size: 0.92rem;
  color: var(--ink-soft);
  position: relative;
  padding-block: 0.4rem;
}
.nav-list a::after {
  content: "";
  position: absolute; left: 0; bottom: 0;
  width: 100%; height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.4s var(--ease);
}
.nav-list a:hover, .nav-list a.active { color: var(--ink); }
.nav-list a:hover::after, .nav-list a.active::after {
  transform: scaleX(1);
  transform-origin: left;
}
.nav-cta { padding: 0.7rem 1.3rem; }

/* Mobile toggle */
.nav-toggle {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px; height: 44px;
  margin-right: -10px;
}
.nav-toggle span {
  display: block;
  width: 24px; height: 1.5px;
  background: var(--ink);
  margin-inline: auto;
  transition: transform 0.4s var(--ease), opacity 0.3s var(--ease);
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* Mobile nav panel */
.mobile-nav {
  position: fixed;
  inset: 78px 0 auto 0;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  padding: 1.5rem var(--pad) 2.25rem;
  transform: translateY(-12px);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.4s var(--ease), opacity 0.4s var(--ease);
  z-index: 99;
}
.mobile-nav.open { transform: translateY(0); opacity: 1; pointer-events: auto; }
.mobile-nav ul { display: flex; flex-direction: column; }
.mobile-nav li { border-bottom: 1px solid var(--line-soft); }
.mobile-nav li a {
  display: block;
  padding: 1rem 0;
  font-size: 1.1rem;
  font-family: var(--serif);
  color: var(--ink);
}
.mobile-nav .btn { margin-top: 1.5rem; width: 100%; justify-content: center; }

body.menu-open { overflow: hidden; }

/* =========================================================
   Hero
   ========================================================= */
.hero {
  position: relative;
  padding-top: clamp(8rem, 18vw, 11rem);
  padding-bottom: clamp(3rem, 7vw, 5.5rem);
  overflow: hidden;
}
.hero::before {
  /* soft radial wash, top-right */
  content: "";
  position: absolute;
  top: -20%; right: -10%;
  width: 60vw; height: 60vw;
  max-width: 760px; max-height: 760px;
  background: radial-gradient(circle, rgba(51,94,84,0.10), transparent 62%);
  z-index: 0;
  pointer-events: none;
}
.hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  gap: clamp(2.5rem, 6vw, 4.5rem);
  align-items: center;
}
.hero-copy { max-width: 38rem; }
.hero h1 { margin-bottom: 1.6rem; }
.hero h1 em { color: var(--accent); }
.hero-sub {
  font-size: 1.2rem;
  color: var(--ink-soft);
  max-width: 33rem;
  margin-bottom: 2.4rem;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 1rem; }

/* Hero visual */
.hero-visual { position: relative; }
.hero-photo {
  position: relative;
  margin: 0;
  border-radius: 10px;
  overflow: hidden;
  aspect-ratio: 16 / 11;
  box-shadow: 0 40px 80px -50px rgba(24,48,43,0.65);
}
.hero-photo::after {
  /* fine inner frame line */
  content: "";
  position: absolute; inset: 0;
  border: 1px solid rgba(27,28,25,0.14);
  border-radius: 10px;
  pointer-events: none;
  z-index: 2;
}
.hero-photo img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center;
  transform: scale(1.06);
  animation: heroZoom 1.8s var(--ease) 0.15s forwards;
}
.hero-photo figcaption {
  position: absolute;
  inset: auto 0 0 0;
  z-index: 2;
  padding: 2.4rem 1.4rem 1.15rem;
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #fff;
  background: linear-gradient(to top, rgba(14,26,23,0.72), transparent);
}
@keyframes heroZoom { to { transform: scale(1); } }

/* =========================================================
   About
   ========================================================= */
.about { background: var(--bg); }
.about-grid {
  display: grid;
  gap: clamp(2.5rem, 6vw, 4.5rem);
  align-items: center;
}
.about-copy { max-width: 52rem; }
.about-copy h2 { margin-bottom: 1.6rem; }
.about-copy .lead { margin-bottom: 1.2rem; }
.about-copy p + p { margin-top: 1.15rem; color: var(--muted); }

.stat-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 2.75rem;
  padding-top: 2.25rem;
  border-top: 1px solid var(--line);
}
.stat-num {
  display: block;
  position: relative;
  font-family: var(--serif);
  font-size: clamp(2.2rem, 5vw, 3rem);
  color: var(--accent);
  line-height: 1;
}
.stat-pre {
  display: block;
  font-family: var(--sans);
  font-size: 0.66rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.35rem;
}
.stat-label {
  display: block;
  margin-top: 0.6rem;
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.4;
}

/* =========================================================
   Services
   ========================================================= */
.services { background: var(--bg-alt); }
.service-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}
.service-card {
  background: var(--bg);
  padding: clamp(1.9rem, 3.5vw, 2.6rem);
  transition: background 0.45s var(--ease), transform 0.45s var(--ease);
  position: relative;
}
.service-card::before {
  content: "";
  position: absolute; left: 0; top: 0;
  width: 100%; height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.5s var(--ease);
}
.service-card:hover { background: var(--paper); }
.service-card:hover::before { transform: scaleX(1); }

.service-icon {
  display: inline-grid;
  place-items: center;
  width: 48px; height: 48px;
  margin-bottom: 1.5rem;
  color: var(--accent);
  border: 1px solid var(--line);
  border-radius: 50%;
  transition: background 0.45s var(--ease), color 0.45s var(--ease), border-color 0.45s var(--ease);
}
.service-icon svg {
  width: 24px; height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.service-card:hover .service-icon {
  background: var(--accent);
  color: var(--bg);
  border-color: var(--accent);
}
.service-card h3 { margin-bottom: 0.7rem; }
.service-card p { font-size: 0.96rem; color: var(--muted); }

/* =========================================================
   Why Michael
   ========================================================= */
.why { background: var(--bg); }
.why-grid { display: grid; gap: clamp(2.5rem, 5vw, 4rem); }
.why-head { max-width: 34rem; }

.why-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
}
.why-list li {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.15rem 0;
  border-top: 1px solid var(--line);
  font-size: 1.05rem;
  color: var(--ink-soft);
}
.why-list li:last-child { border-bottom: 1px solid var(--line); }
.why-tick {
  flex: none;
  width: 22px; height: 22px;
  border-radius: 50%;
  border: 1px solid var(--accent);
  position: relative;
}
.why-tick::after {
  content: "";
  position: absolute;
  left: 7px; top: 4px;
  width: 5px; height: 9px;
  border: solid var(--accent);
  border-width: 0 1.5px 1.5px 0;
  transform: rotate(45deg);
}

/* =========================================================
   Consultation band
   ========================================================= */
.consult {
  background: var(--accent-deep);
  color: #fff;
  text-align: center;
  padding-block: clamp(4.5rem, 10vw, 8rem);
  position: relative;
  overflow: hidden;
}
.consult::before, .consult::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.07);
  pointer-events: none;
}
.consult::before { width: 460px; height: 460px; top: -160px; left: -120px; }
.consult::after  { width: 360px; height: 360px; bottom: -150px; right: -90px; }
.consult-inner { position: relative; z-index: 1; max-width: 44rem; margin-inline: auto; }
.consult h2 { color: #fff; margin-bottom: 1.4rem; }
.consult-copy { color: rgba(255,255,255,0.78); font-size: 1.12rem; margin-bottom: 2.4rem; }

/* =========================================================
   Contact
   ========================================================= */
.contact { background: var(--bg); }
.contact-grid { display: grid; gap: clamp(2.5rem, 6vw, 4.5rem); align-items: start; }
.contact-intro h2 { margin-bottom: 1.4rem; }

.contact-details {
  margin-top: 2.5rem;
  border-top: 1px solid var(--line);
}
.contact-details li {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 1.1rem 0;
  border-bottom: 1px solid var(--line);
}
.contact-label {
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}
.contact-details a, .contact-details span:not(.contact-label) {
  font-size: 1.05rem;
  color: var(--ink);
}
.contact-details a { transition: color 0.3s var(--ease); }
.contact-details a:hover { color: var(--accent); }

/* Form */
.contact-form {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: clamp(1.6rem, 4vw, 2.5rem);
  display: grid;
  gap: 1.3rem;
}
.field { display: grid; gap: 0.5rem; }
.field-row { display: grid; gap: 1.3rem; }
.field label {
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
  font-weight: 500;
}
.field input, .field textarea {
  width: 100%;
  padding: 0.85rem 1rem;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color 0.3s var(--ease), box-shadow 0.3s var(--ease), background 0.3s var(--ease);
  resize: vertical;
}
.field input:focus, .field textarea:focus {
  outline: none;
  border-color: var(--accent);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(33,64,58,0.1);
}
.field input:user-invalid, .field textarea:user-invalid {
  border-color: #a8443a;
}
.form-status {
  font-size: 0.92rem;
  padding: 0.85rem 1rem;
  border-radius: var(--radius);
  background: var(--accent-soft);
  color: var(--accent-deep);
  border: 1px solid rgba(33,64,58,0.18);
}
.form-status--error {
  background: #FBEDEA;
  color: #8E2F22;
  border-color: rgba(142,47,34,0.25);
}

/* =========================================================
   Footer
   ========================================================= */
.site-footer {
  background: var(--ink);
  color: rgba(255,255,255,0.62);
  padding-top: clamp(3.5rem, 7vw, 5rem);
  padding-bottom: 2.5rem;
}
.footer-grid {
  display: grid;
  gap: 2.5rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.footer-brand .brand-mark {
  border-color: rgba(255,255,255,0.4);
  color: #fff;
  margin-bottom: 1.1rem;
}
.footer-name { font-family: var(--serif); font-size: 1.3rem; color: #fff; margin-bottom: 0.6rem; }
.footer-tag { font-size: 0.92rem; max-width: 24rem; color: rgba(255,255,255,0.55); }
.footer-heading {
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.45);
  margin-bottom: 1.1rem;
}
.footer-nav ul, .footer-contact ul { display: grid; gap: 0.7rem; }
.footer-nav a, .footer-contact a { transition: color 0.3s var(--ease); }
.footer-nav a:hover, .footer-contact a:hover { color: #fff; }
.footer-contact li { font-size: 0.95rem; }

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.6rem;
  padding-top: 2rem;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.4);
}

/* =========================================================
   Scroll reveal
   ========================================================= */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
  will-change: opacity, transform;
}
.reveal.in { opacity: 1; transform: none; }

/* =========================================================
   Responsive
   ========================================================= */
@media (min-width: 600px) {
  .field-row { grid-template-columns: 1fr 1fr; }
  .service-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 900px) {
  .nav { display: flex; }
  .nav-toggle, .mobile-nav { display: none; }

  .hero-inner { grid-template-columns: 1.05fr 0.95fr; }
  .service-grid { grid-template-columns: repeat(3, 1fr); }
  .why-grid { grid-template-columns: 0.85fr 1.15fr; align-items: start; }
  .why-list { grid-template-columns: 1fr 1fr; column-gap: 2.75rem; }
  .why-list li:nth-child(2) { border-top: 1px solid var(--line); }
  .contact-grid { grid-template-columns: 0.9fr 1.1fr; }
  .footer-grid { grid-template-columns: 1.4fr 0.8fr 1fr; gap: 3rem; }
}

/* ----- Reduced motion ----- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .reveal { opacity: 1; transform: none; }
  .hero-photo img { transform: none; animation: none; }
}
