/* REF Family Ltd */
:root {
  --ink: #1f2a44;
  --ink-soft: #3a4566;
  --text: #2b2f38;
  --muted: #5a6070;
  --paper: #fbf7f0;
  --paper-deep: #f2eadc;
  --white: #ffffff;
  --accent: #9e3b2f;
  --accent-dark: #7f2d23;
  --gold: #c99a3c;
  --sage: #5f7a68;
  --line: #e4dccd;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(31, 42, 68, 0.08);
  --font-head: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --header-h: 68px;
}

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

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: var(--font-head);
  color: var(--ink);
  line-height: 1.15;
  margin: 0 0 0.6em;
  font-weight: 600;
}

h1 { font-size: clamp(2.25rem, 5.5vw, 3.75rem); letter-spacing: -0.01em; }
h2 { font-size: clamp(1.75rem, 3.6vw, 2.5rem); }
h3 { font-size: 1.3rem; }

p { margin: 0 0 1em; }

a { color: var(--accent-dark); }
a:hover { color: var(--accent); }

:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
  border-radius: 4px;
}

.container {
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* Skip link */
.skip-link {
  position: absolute;
  left: 1rem;
  top: -100px;
  z-index: 100;
  background: var(--ink);
  color: var(--white);
  padding: 0.75rem 1rem;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
}
.skip-link:focus { top: 1rem; color: var(--white); }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(251, 247, 240, 0.94);
  backdrop-filter: saturate(160%) blur(8px);
  -webkit-backdrop-filter: saturate(160%) blur(8px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--header-h);
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: baseline;
  gap: 0.35rem;
  text-decoration: none;
  color: var(--ink);
}
.brand:hover { color: var(--ink); }

.brand-name {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.45rem;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.brand-suffix {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}

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

.site-nav a {
  display: block;
  padding: 0.5rem 0.9rem;
  border-radius: 999px;
  text-decoration: none;
  color: var(--ink);
  font-weight: 500;
  font-size: 0.98rem;
}
.site-nav a:hover { background: var(--paper-deep); color: var(--ink); }

.nav-toggle {
  display: none;
  align-items: center;
  gap: 0.55rem;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.5rem 0.9rem;
  font: inherit;
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--ink);
  cursor: pointer;
}

.nav-toggle-bar,
.nav-toggle-bar::before,
.nav-toggle-bar::after {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  position: relative;
  transition: transform 0.2s ease, background 0.2s ease;
}
.nav-toggle-bar::before,
.nav-toggle-bar::after { content: ""; position: absolute; left: 0; }
.nav-toggle-bar::before { top: -6px; }
.nav-toggle-bar::after { top: 6px; }

.nav-toggle[aria-expanded="true"] .nav-toggle-bar { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar::after { transform: translateY(-6px) rotate(-45deg); }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.75rem 1.5rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  border: 2px solid transparent;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}
.btn:hover { transform: translateY(-1px); }

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

.btn-ghost { border-color: var(--ink); color: var(--ink); background: transparent; }
.btn-ghost:hover { background: var(--ink); color: var(--white); }

/* Hero */
.hero {
  position: relative;
  overflow: hidden;
  padding: clamp(3.5rem, 9vw, 6.5rem) 0 clamp(3.5rem, 8vw, 6rem);
  background:
    radial-gradient(ellipse 60% 70% at 95% 10%, rgba(201, 154, 60, 0.18), transparent 70%),
    radial-gradient(ellipse 50% 60% at 0% 100%, rgba(158, 59, 47, 0.10), transparent 70%),
    var(--paper);
}

.hero-inner {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  align-items: center;
  gap: 3rem;
}

.eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-dark);
  margin-bottom: 1rem;
}

.hero h1 em {
  font-style: italic;
  color: var(--accent);
}

.lead {
  font-size: clamp(1.08rem, 1.6vw, 1.22rem);
  color: var(--muted);
  max-width: 36rem;
  margin-bottom: 2rem;
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 0.85rem; }

/* CSS book shelf */
.hero-art {
  position: relative;
  justify-self: center;
  width: 100%;
  max-width: 380px;
  padding: 2rem 1.5rem 0;
}

.shelf {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 8px;
  height: 260px;
}

.spine {
  display: block;
  width: 46px;
  border-radius: 5px 5px 2px 2px;
  position: relative;
  box-shadow: inset -6px 0 0 rgba(0, 0, 0, 0.12), 0 6px 14px rgba(31, 42, 68, 0.12);
}
.spine::before,
.spine::after {
  content: "";
  position: absolute;
  left: 9px;
  right: 15px;
  height: 3px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.55);
}
.spine::before { top: 18%; }
.spine::after { top: calc(18% + 9px); }

.s1 { height: 78%; background: var(--ink); }
.s2 { height: 92%; background: var(--accent); width: 54px; }
.s3 { height: 70%; background: var(--gold); width: 38px; }
.s4 { height: 86%; background: var(--sage); }
.s5 { height: 64%; background: var(--ink-soft); width: 40px; }
.s6 {
  height: 80%;
  width: 50px;
  background: var(--accent-dark);
  transform: rotate(9deg);
  transform-origin: bottom left;
  margin-left: 4px;
}

.shelf-board {
  height: 14px;
  margin: 0 -0.5rem;
  border-radius: 4px;
  background: linear-gradient(180deg, #b08a5a, #8d6a40);
  box-shadow: 0 10px 24px rgba(31, 42, 68, 0.15);
}

/* Sections */
.section { padding: clamp(3.5rem, 8vw, 6rem) 0; }
.section-alt { background: var(--white); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

.section-head { max-width: 40rem; margin-bottom: 2.5rem; }
.section-intro { color: var(--muted); font-size: 1.1rem; }

.cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow);
}
.card p { color: var(--muted); }
.card-meta {
  margin: 1.25rem 0 0;
  padding-top: 1rem;
  border-top: 1px dashed var(--line);
  font-size: 0.85rem;
  letter-spacing: 0.02em;
  color: var(--muted);
}

.card-mark {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  margin-bottom: 1.25rem;
  position: relative;
}

/* open book shape */
.mark-book { background: rgba(158, 59, 47, 0.1); }
.mark-book::before,
.mark-book::after {
  content: "";
  position: absolute;
  top: 15px;
  width: 15px;
  height: 22px;
  background: var(--accent);
}
.mark-book::before { left: 10px; border-radius: 3px 0 0 3px; transform: skewY(8deg); }
.mark-book::after { right: 10px; border-radius: 0 3px 3px 0; transform: skewY(-8deg); }

/* stacked blocks shape */
.mark-hold { background: rgba(31, 42, 68, 0.08); }
.mark-hold::before,
.mark-hold::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  height: 9px;
  border-radius: 3px;
  background: var(--ink);
}
.mark-hold::before { top: 14px; left: 18px; right: 18px; background: var(--gold); }
.mark-hold::after { top: 28px; }

/* About */
.about-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 3rem;
  align-items: start;
}
.about-copy p { font-size: 1.1rem; max-width: 38rem; }

.facts {
  background: var(--paper);
  border: 1px solid var(--line);
  border-left: 5px solid var(--accent);
  border-radius: var(--radius);
  padding: 1.75rem;
}
.facts h3 { margin-bottom: 1rem; }
.facts dl { margin: 0; }
.facts dl > div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--line);
}
.facts dl > div:last-child { border-bottom: 0; }
.facts dt { color: var(--muted); font-size: 0.95rem; }
.facts dd { margin: 0; font-weight: 600; color: var(--ink); text-align: right; }

/* Contact */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.25fr;
  gap: 3rem;
  align-items: stretch;
}

.address-card {
  font-style: normal;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem 1.75rem;
  margin: 1.5rem 0 1.75rem;
  line-height: 1.75;
  color: var(--ink);
  box-shadow: var(--shadow);
}
.address-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-dark);
  margin-bottom: 0.35rem;
}

.map-wrap {
  min-height: 360px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  background: var(--paper-deep);
}
.map-wrap iframe {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 360px;
  border: 0;
}

/* Footer */
.site-footer {
  background: var(--ink);
  color: #d9dcea;
  padding: 3rem 0 2rem;
}
.site-footer .brand-name { color: var(--white); }
.site-footer .brand-suffix { color: #e9c27a; }

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1.5rem;
  padding-bottom: 1.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}
.footer-brand p { margin: 0.5rem 0 0; font-size: 0.95rem; }

.footer-nav { display: flex; flex-wrap: wrap; gap: 1.25rem; }
.footer-nav a { color: #eef0f7; text-decoration: none; font-weight: 500; }
.footer-nav a:hover { color: #e9c27a; text-decoration: underline; }

.footer-legal { padding-top: 1.5rem; font-size: 0.875rem; color: #c3c8da; }
.footer-legal p { margin: 0 0 0.5rem; }

/* Responsive */
@media (max-width: 960px) {
  .hero-inner { grid-template-columns: 1fr; gap: 2.5rem; }
  .hero-art { max-width: 320px; padding-top: 0; }
  .shelf { height: 200px; }
  .about-grid,
  .contact-grid { grid-template-columns: 1fr; gap: 2rem; }
}

@media (max-width: 720px) {
  .nav-toggle { display: inline-flex; }
  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 12px 24px rgba(31, 42, 68, 0.08);
    display: none;
  }
  .site-nav.is-open { display: block; }
  .site-nav ul { flex-direction: column; padding: 0.5rem 1.25rem 1rem; gap: 0; }
  .site-nav a { border-radius: 8px; padding: 0.85rem 0.75rem; }

  .cards { grid-template-columns: 1fr; }
  .card { padding: 1.5rem; }
  .hero-actions .btn { flex: 1 1 auto; }
  .spine { width: 36px; }
  .s2 { width: 42px; }
  .s3, .s5 { width: 30px; }
  .s6 { width: 38px; }
  .facts dl > div { flex-direction: column; gap: 0.15rem; }
  .facts dd { text-align: left; }
  .map-wrap, .map-wrap iframe { min-height: 300px; }
}

/* No-JS fallback: keep nav visible */
.no-js .nav-toggle { display: none; }
@media (max-width: 720px) {
  .no-js .site-nav { display: block; position: static; box-shadow: none; border: 0; }
}
