/* lay-away.co.uk — sage / stone / muted olive */
:root,
[data-theme="light"] {
  --bg: #f5f4f0;
  --bg-elevated: #fbfaf7;
  --text: #2c2f28;
  --text-muted: #5f6458;
  --border: #ddd9cf;
  --primary: #5f6f4e;
  --primary-hover: #4a573c;
  --accent: #8a7d5c;
  --hero-grad: linear-gradient(145deg, #5f6f4e 0%, #4a5540 48%, #3a4034 100%);
  --shadow: 0 8px 24px rgba(44, 47, 40, 0.07);
  --focus: #5f6f4e;
  --radius: 12px;
  --font: "Segoe UI", system-ui, -apple-system, sans-serif;
  --mono: ui-monospace, "Cascadia Code", Consolas, monospace;
  --max: 1060px;
  --header-h: 4rem;
}

[data-theme="dark"] {
  --bg: #161814;
  --bg-elevated: #1e211b;
  --text: #ebe8df;
  --text-muted: #a8aea0;
  --border: #33382f;
  --primary: #a3b48c;
  --primary-hover: #b9c7a5;
  --accent: #c4b48a;
  --hero-grad: linear-gradient(145deg, #3d4636 0%, #2a3026 48%, #1a1d18 100%);
  --shadow: 0 8px 28px rgba(0, 0, 0, 0.4);
  --focus: #a3b48c;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

a {
  color: var(--primary);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}
a:hover { color: var(--primary-hover); }

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

.skip-link {
  position: absolute;
  left: -999px;
  top: 0.5rem;
  background: var(--primary);
  color: #fff;
  padding: 0.5rem 1rem;
  z-index: 1000;
  border-radius: 6px;
}
.skip-link:focus { left: 0.5rem; }

.container {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: color-mix(in srgb, var(--bg-elevated) 92%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

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

.logo {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.02em;
}
.logo span { color: var(--primary); }

.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  border-radius: 8px;
  color: var(--text);
  cursor: pointer;
  font-size: 1.1rem;
}

.nav-wrap {
  display: none;
  position: absolute;
  top: var(--header-h);
  left: 0;
  right: 0;
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border);
  padding: 1rem;
}

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

.site-nav {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.site-nav a {
  color: var(--text);
  text-decoration: none;
  padding: 0.6rem 0.75rem;
  border-radius: 8px;
  font-weight: 500;
}
.site-nav a:hover,
.site-nav a[aria-current="page"] {
  background: color-mix(in srgb, var(--primary) 12%, transparent);
  color: var(--primary);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.theme-toggle {
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text);
  border-radius: 999px;
  padding: 0.4rem 0.85rem;
  font-size: 0.85rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}
.theme-toggle:hover { border-color: var(--primary); }

@media (min-width: 800px) {
  .nav-toggle { display: none; }
  .nav-wrap {
    display: block !important;
    position: static;
    border: 0;
    padding: 0;
    background: transparent;
  }
  .site-nav {
    flex-direction: row;
    align-items: center;
    gap: 0.15rem;
    margin-left: auto;
  }
  .header-inner { gap: 2rem; }
}

/* Hero */
.hero {
  background: var(--hero-grad);
  color: #f5f3ec;
  padding: 3.5rem 0 3.75rem;
  position: relative;
  overflow: hidden;
}
.hero::after {
  content: "";
  position: absolute;
  inset: auto -10% -40% 40%;
  height: 80%;
  background: radial-gradient(circle, rgba(196, 180, 138, 0.22), transparent 60%);
  pointer-events: none;
}
.hero .container { position: relative; z-index: 1; }
.hero h1 {
  margin: 0 0 0.75rem;
  font-size: clamp(1.85rem, 4vw, 2.55rem);
  line-height: 1.2;
  letter-spacing: -0.03em;
  max-width: 14ch;
}
.hero .lead {
  margin: 0 0 1.5rem;
  font-size: 1.1rem;
  max-width: 44ch;
  opacity: 0.92;
  line-height: 1.7;
}
.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}
.chip {
  display: inline-flex;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.16);
  font-size: 0.85rem;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.7rem 1.2rem;
  border-radius: 10px;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  font-size: 0.95rem;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: #f5f3ec;
  color: #3a4034;
}
.btn-primary:hover {
  background: #ebe6d8;
  color: #3a4034;
}
.btn-ghost {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.35);
}
.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}
.btn-solid {
  background: var(--primary);
  color: #fff;
}
.btn-solid:hover {
  background: var(--primary-hover);
  color: #fff;
}
.btn-outline {
  background: transparent;
  color: var(--primary);
  border-color: var(--primary);
}
.btn-outline:hover {
  background: color-mix(in srgb, var(--primary) 12%, transparent);
}

/* Sections */
main { flex: 1; }
.section { padding: 3rem 0; }
.section-alt {
  background: var(--bg-elevated);
  border-block: 1px solid var(--border);
}
.section h2 {
  margin: 0 0 0.5rem;
  font-size: clamp(1.4rem, 2.5vw, 1.85rem);
  letter-spacing: -0.02em;
}
.section .section-intro {
  margin: 0 0 1.75rem;
  color: var(--text-muted);
  max-width: 55ch;
}

.grid-3 {
  display: grid;
  gap: 1.25rem;
}
@media (min-width: 700px) {
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
}

.grid-2 {
  display: grid;
  gap: 1.25rem;
}
@media (min-width: 700px) {
  .grid-2 { grid-template-columns: repeat(2, 1fr); }
}

.card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.35rem;
  box-shadow: var(--shadow);
  transition: transform 0.18s ease, border-color 0.18s ease;
}
.card:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--primary) 40%, var(--border));
}
.card h3 {
  margin: 0 0 0.5rem;
  font-size: 1.1rem;
}
.card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}
.card .card-link {
  display: inline-block;
  margin-top: 0.9rem;
  font-weight: 600;
  text-decoration: none;
}
.card .icon {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 8px;
  background: color-mix(in srgb, var(--primary) 15%, transparent);
  color: var(--primary);
  display: grid;
  place-items: center;
  margin-bottom: 0.85rem;
  font-weight: 700;
  font-size: 0.85rem;
}

.prose { max-width: 68ch; }
.prose h2,
.prose h3 { margin-top: 1.75rem; }
.prose p,
.prose li { color: var(--text); }
.prose .muted { color: var(--text-muted); }
.prose ul { padding-left: 1.2rem; }
.prose li { margin-bottom: 0.4rem; }
.prose code {
  font-family: var(--mono);
  font-size: 0.9em;
  padding: 0.1em 0.35em;
  border-radius: 4px;
  background: color-mix(in srgb, var(--primary) 10%, transparent);
}

.principles {
  border-left: 2px solid var(--border);
  margin: 1.5rem 0 0;
  padding-left: 1.25rem;
  display: grid;
  gap: 1.25rem;
}
.principle strong {
  display: block;
  color: var(--primary);
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.principle h3 {
  margin: 0.2rem 0 0.35rem;
  font-size: 1.05rem;
}
.principle p {
  margin: 0;
  color: var(--text-muted);
}

/* Form */
.form {
  display: grid;
  gap: 1rem;
  max-width: 32rem;
}
.form label {
  display: grid;
  gap: 0.35rem;
  font-weight: 600;
  font-size: 0.9rem;
}
.form input,
.form textarea {
  font: inherit;
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg);
  color: var(--text);
}
.form input:focus,
.form textarea:focus {
  outline: 2px solid var(--focus);
  outline-offset: 1px;
  border-color: var(--primary);
}
.form textarea {
  min-height: 8rem;
  resize: vertical;
}
.form-note {
  font-size: 0.9rem;
  color: var(--text-muted);
  max-width: 42ch;
}
.form-success {
  display: none;
  padding: 0.85rem 1rem;
  border-radius: 10px;
  background: color-mix(in srgb, var(--primary) 15%, transparent);
  border: 1px solid color-mix(in srgb, var(--primary) 35%, transparent);
  color: var(--text);
}
.form-success.is-visible { display: block; }

/* Footer */
.site-footer {
  margin-top: auto;
  border-top: 1px solid var(--border);
  background: var(--bg-elevated);
  padding: 2rem 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}
.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.footer-inner a { color: var(--text-muted); }
.footer-inner a:hover { color: var(--primary); }
@media (min-width: 700px) {
  .footer-inner {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
}

.page-hero {
  padding: 2.5rem 0 1.5rem;
  border-bottom: 1px solid var(--border);
}
.page-hero h1 {
  margin: 0 0 0.5rem;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  letter-spacing: -0.02em;
}
.page-hero p {
  margin: 0;
  color: var(--text-muted);
  max-width: 50ch;
}

.badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.contact-aside {
  margin-top: 2rem;
  padding: 1.25rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-elevated);
  max-width: 32rem;
}
.contact-aside h2 {
  margin: 0 0 0.5rem;
  font-size: 1.05rem;
}
.contact-aside p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}
