/* Stirling Conveyancing Services - Redesign Mockup */
/* Vanilla CSS, no frameworks, no build step */

/* ============================================
   CSS CUSTOM PROPERTIES
   ============================================ */

:root {
  --font-display: 'Newsreader', Georgia, serif;
  --font-body: 'Manrope', system-ui, -apple-system, sans-serif;

  --text-display-xl: 3.5rem;
  --text-display: 2.5rem;
  --text-h2: 1.75rem;
  --text-h3: 1.375rem;
  --text-h4: 1.125rem;
  --text-body: 1rem;
  --text-body-sm: 0.9375rem;
  --text-label: 0.8125rem;
  --text-caption: 0.75rem;

  --color-ink: #1A1A1A;
  --color-graphite: #333333;
  --color-stone: #6B6558;
  --color-paper: #FFFFFF;
  --color-cream: #FAF8F5;
  --color-brass: #C4A24A;
  --color-brass-dark: #A0852F;
  --color-brass-muted: #D9C995;
  --color-border: #E8E4DC;
  --color-border-dark: #D1CCC2;
  --color-error: #B5423F;
  --color-success: #4A7C59;

  --space-xs: 0.5rem;
  --space-sm: 0.75rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2.5rem;
  --space-2xl: 4rem;
  --space-3xl: 6rem;

  --container-max: 68rem;
  --container-padding: 1.5rem;
}

@media (max-width: 479px) {
  :root {
    --text-display-xl: 2.25rem;
    --text-display: 2rem;
    --text-h2: 1.5rem;
    --text-h3: 1.25rem;
    --container-padding: 1rem;
  }
}

@media (min-width: 480px) and (max-width: 767px) {
  :root {
    --text-display-xl: 2.75rem;
    --text-display: 2.25rem;
  }
}

/* ============================================
   RESET & BASE
   ============================================ */

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

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

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--text-body);
  line-height: 1.65;
  color: var(--color-graphite);
  background-color: var(--color-paper);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

/* ============================================
   TYPOGRAPHY
   ============================================ */

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.2;
  color: var(--color-ink);
  margin: 0;
}

h1 {
  font-size: var(--text-display);
  font-weight: 700;
  letter-spacing: -0.015em;
}

h2 {
  font-size: var(--text-h2);
  letter-spacing: -0.01em;
}

h3 {
  font-size: var(--text-h3);
}

h4 {
  font-size: var(--text-h4);
}

p {
  margin: 0;
}

p + p {
  margin-top: var(--space-md);
}

.lead {
  font-size: var(--text-body-sm);
  color: var(--color-stone);
  max-width: 36em;
}

.label {
  font-family: var(--font-body);
  font-size: var(--text-label);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-stone);
}

/* ============================================
   LAYOUT
   ============================================ */

.container {
  width: 100%;
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--container-padding);
  padding-right: var(--container-padding);
}

.section {
  padding-top: var(--space-3xl);
  padding-bottom: var(--space-3xl);
}

.section-cream {
  background-color: var(--color-cream);
}

/* ============================================
   BOUNDARY LINE MOTIF
   ============================================ */

.boundary-line {
  height: 1px;
  background-color: var(--color-brass);
  width: 100%;
  margin: var(--space-xl) 0;
  border: none;
}

.boundary-line--double {
  height: 3px;
  background: linear-gradient(
    to bottom,
    var(--color-brass) 0px,
    var(--color-brass) 1px,
    transparent 1px,
    transparent 2px,
    var(--color-brass) 2px,
    var(--color-brass) 3px
  );
  border: none;
}

/* ============================================
   SKIP LINK
   ============================================ */

.skip-link {
  position: absolute;
  top: -100%;
  left: var(--container-padding);
  z-index: 1000;
  padding: var(--space-sm) var(--space-md);
  background: var(--color-ink);
  color: var(--color-paper);
  font-family: var(--font-body);
  font-size: var(--text-label);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.skip-link:focus {
  top: var(--space-md);
  outline: 2px solid var(--color-brass);
  outline-offset: 2px;
}

/* ============================================
   HEADER & NAVIGATION
   ============================================ */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: var(--color-paper);
  border-bottom: 1px solid var(--color-border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 4rem;
}

.logo {
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 500;
  color: var(--color-ink);
  line-height: 1.2;
}

.logo span {
  font-family: var(--font-body);
  font-size: var(--text-caption);
  font-weight: 500;
  color: var(--color-stone);
  display: block;
  letter-spacing: 0.02em;
  text-transform: none;
  margin-top: 2px;
}

.desktop-nav {
  display: none;
}

.desktop-nav ul {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 2rem;
}

.desktop-nav a {
  font-family: var(--font-body);
  font-size: var(--text-label);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-graphite);
  padding: 0.75rem 0;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  border-bottom: 2px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.desktop-nav a:hover {
  color: var(--color-brass);
}

.desktop-nav a[aria-current="page"] {
  border-bottom-color: var(--color-brass);
}

.mobile-nav-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 2.5rem;
  height: 2.5rem;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.mobile-nav-toggle span {
  display: block;
  width: 1.5rem;
  height: 1px;
  background-color: var(--color-ink);
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.mobile-nav {
  display: none;
  background-color: var(--color-cream);
  border-bottom: 1px solid var(--color-border);
}

.mobile-nav.is-open {
  display: block;
}

.mobile-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.mobile-nav a {
  display: block;
  padding: var(--space-md) var(--container-padding);
  font-family: var(--font-body);
  font-size: var(--text-body);
  font-weight: 500;
  color: var(--color-graphite);
  min-height: 48px;
  border-left: 3px solid transparent;
  transition: border-color 0.15s ease, color 0.15s ease;
}

.mobile-nav a:hover {
  color: var(--color-brass);
}

.mobile-nav a[aria-current="page"] {
  border-left-color: var(--color-brass);
  padding-left: calc(var(--container-padding) - 3px);
}

@media (min-width: 768px) {
  .desktop-nav {
    display: block;
  }
  .mobile-nav-toggle {
    display: none;
  }
  .mobile-nav {
    display: none !important;
  }
}

/* ============================================
   HERO / PAGE HEADER
   ============================================ */

.page-header {
  padding-top: var(--space-3xl);
  padding-bottom: var(--space-xl);
}

.page-header h1 {
  font-size: var(--text-display-xl);
  line-height: 1.05;
  letter-spacing: -0.02em;
}

.page-header .lead {
  margin-top: var(--space-lg);
  font-size: var(--text-body);
}

.page-header--sub h1 {
  font-size: var(--text-display);
}

/* ============================================
   BUTTONS
   ============================================ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.75rem 1.5rem;
  font-family: var(--font-body);
  font-size: var(--text-label);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border: none;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.btn-primary {
  background-color: var(--color-brass);
  color: var(--color-paper);
}

.btn-primary:hover {
  background-color: var(--color-brass-dark);
}

.btn-secondary {
  background-color: transparent;
  color: var(--color-graphite);
  border: 1px solid var(--color-border-dark);
}

.btn-secondary:hover {
  border-color: var(--color-brass);
  color: var(--color-brass);
}

.btn:focus-visible {
  outline: 2px solid var(--color-brass);
  outline-offset: 2px;
}

/* ============================================
   SERVICE CARDS
   ============================================ */

.cards-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-md);
}

@media (min-width: 640px) {
  .cards-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1080px) {
  .cards-grid--3 {
    grid-template-columns: repeat(3, 1fr);
  }
}

.card {
  background-color: var(--color-paper);
  border: 1px solid var(--color-border);
  padding: var(--space-lg);
  transition: border-color 0.2s ease;
}

.card:hover {
  border-color: var(--color-brass);
}

.card h3 {
  margin-bottom: var(--space-sm);
}

.card p {
  color: var(--color-stone);
  font-size: var(--text-body-sm);
}

/* ============================================
   FEE TABLE
   ============================================ */

.fee-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: var(--space-xl);
}

.fee-table thead {
  background-color: var(--color-brass);
  color: var(--color-paper);
}

.fee-table th {
  font-family: var(--font-body);
  font-size: var(--text-label);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-align: left;
  padding: var(--space-md) var(--space-lg);
}

.fee-table td {
  padding: var(--space-md) var(--space-lg);
  border-bottom: 1px solid var(--color-border);
}

.fee-table tbody tr:nth-child(even) {
  background-color: var(--color-cream);
}

.fee-table .fee-price {
  font-family: var(--font-display);
  font-size: var(--text-h4);
  font-weight: 500;
  color: var(--color-ink);
  text-align: right;
  white-space: nowrap;
}

.fee-table .fee-desc {
  color: var(--color-stone);
  font-size: var(--text-body-sm);
}

@media (max-width: 639px) {
  .fee-table thead {
    display: none;
  }

  .fee-table tr {
    display: block;
    margin-bottom: var(--space-md);
    border: 1px solid var(--color-border);
  }

  .fee-table td {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-sm) var(--space-md);
    border-bottom: 1px solid var(--color-border);
  }

  .fee-table td::before {
    content: attr(data-label);
    font-family: var(--font-body);
    font-size: var(--text-label);
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--color-stone);
    margin-right: var(--space-md);
  }

  .fee-table .fee-price {
    text-align: right;
    font-size: var(--text-body);
  }
}

/* ============================================
   PROCESS STEPS
   ============================================ */

.process-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.process-list li {
  padding: var(--space-lg) 0;
  border-bottom: 1px solid var(--color-border);
}

.process-list li:first-child {
  padding-top: 0;
}

.process-list h3 {
  margin-bottom: var(--space-xs);
}

.process-list p {
  color: var(--color-stone);
  font-size: var(--text-body-sm);
}

/* ============================================
   FORMS
   ============================================ */

.form-group {
  margin-bottom: var(--space-md);
}

.form-group label {
  display: block;
  font-family: var(--font-body);
  font-size: var(--text-label);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-stone);
  margin-bottom: var(--space-xs);
}

.form-input {
  width: 100%;
  min-height: 44px;
  padding: 0.75rem 1rem;
  font-family: var(--font-body);
  font-size: var(--text-body);
  color: var(--color-graphite);
  background-color: var(--color-paper);
  border: 1px solid var(--color-border-dark);
  transition: border-color 0.15s ease;
}

.form-input:focus {
  outline: none;
  border-color: var(--color-brass);
}

.form-input::placeholder {
  color: var(--color-stone);
}

textarea.form-input {
  min-height: 8rem;
  resize: vertical;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-md);
}

@media (min-width: 640px) {
  .form-row {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ============================================
   TEAM / ABOUT
   ============================================ */

.team-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-xl);
  margin-top: var(--space-xl);
}

@media (min-width: 640px) {
  .team-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.team-member img {
  width: 100%;
  max-width: 280px;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  margin-bottom: var(--space-md);
}

.team-member h3 {
  margin-bottom: var(--space-xs);
}

.team-member .role {
  font-size: var(--text-body-sm);
  color: var(--color-stone);
  margin-bottom: var(--space-sm);
}

.team-member p {
  font-size: var(--text-body-sm);
  color: var(--color-graphite);
}

/* ============================================
   CONTACT
   ============================================ */

.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-2xl);
}

@media (min-width: 768px) {
  .contact-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.contact-detail {
  margin-bottom: var(--space-md);
}

.contact-detail dt {
  font-size: var(--text-label);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-stone);
  margin-bottom: var(--space-xs);
}

.contact-detail dd {
  margin: 0;
  color: var(--color-graphite);
}

.contact-detail a {
  border-bottom: 1px solid var(--color-brass);
  transition: color 0.15s ease;
}

.contact-detail a:hover {
  color: var(--color-brass);
}

.hours-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: var(--space-sm);
}

.hours-table td {
  padding: var(--space-xs) 0;
  border-bottom: 1px solid var(--color-border);
}

.hours-table td:last-child {
  text-align: right;
}

/* ============================================
   USEFUL LINKS
   ============================================ */

.link-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.link-list li {
  padding: var(--space-md) 0;
  border-bottom: 1px solid var(--color-border);
}

.link-list a {
  font-family: var(--font-display);
  font-size: var(--text-h4);
  color: var(--color-ink);
  border-bottom: 1px solid var(--color-brass);
  padding-bottom: 1px;
  transition: color 0.15s ease;
}

.link-list a:hover {
  color: var(--color-brass);
}

.link-list p {
  margin-top: var(--space-xs);
  font-size: var(--text-body-sm);
  color: var(--color-stone);
}

/* ============================================
   FOOTER
   ============================================ */

.site-footer {
  background-color: var(--color-ink);
  color: var(--color-cream);
  padding-top: var(--space-3xl);
  padding-bottom: var(--space-3xl);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-2xl);
}

@media (min-width: 768px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.footer-section h3 {
  font-family: var(--font-body);
  font-size: var(--text-label);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-cream);
  margin-bottom: var(--space-md);
}

.footer-section p,
.footer-section address {
  font-style: normal;
  font-size: var(--text-body-sm);
  color: #9A958A;
  line-height: 1.7;
}

.footer-section a {
  color: #9A958A;
  border-bottom: 1px solid var(--color-brass);
  transition: color 0.15s ease;
}

.footer-section a:hover {
  color: var(--color-cream);
}

.footer-bottom {
  margin-top: var(--space-2xl);
  padding-top: var(--space-lg);
  border-top: 1px solid #333;
}

.footer-bottom p {
  font-size: var(--text-caption);
  color: #6B6558;
  margin: 0;
}

/* ============================================
   FOCUS & ACCESSIBILITY
   ============================================ */

:focus-visible {
  outline: 2px solid var(--color-brass);
  outline-offset: 2px;
}

:focus:not(:focus-visible) {
  outline: none;
}

/* ============================================
   REDUCED MOTION
   ============================================ */

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

/* ============================================
   PRINT
   ============================================ */

@media print {
  .site-header,
  .mobile-nav-toggle,
  .mobile-nav,
  .site-footer {
    display: none !important;
  }

  body {
    font-size: 11pt;
    line-height: 1.5;
    color: #000;
    background: #fff;
  }

  a {
    color: #000;
    text-decoration: underline;
  }

  a[href]::after {
    content: " (" attr(href) ")";
    font-size: 9pt;
    color: #333;
  }

  .boundary-line,
  .boundary-line--double {
    border-top: 1pt solid #000;
    background: none;
  }

  h1, h2, h3 {
    page-break-after: avoid;
  }

  p, li {
    page-break-inside: avoid;
  }

  .card {
    border: 1pt solid #ccc;
    break-inside: avoid;
  }

  .fee-table {
    break-inside: avoid;
  }
}
