/* Root */
:root {
  --bg: #F6F2EA;
  --surface: #FFFFFF;
  --text: #14213D;
  --muted: #4D5870;
  --accent: #9A4F14;
  --accent-dark: #7C3E0F;
  --accent-text: #FFFFFF;
  --plate-bg: #14213D;
  --plate-text: #F6F2EA;
  --line: #E4DCCE;
  --bg-alt: #EFE8DA;
  --shadow: 0 1px 2px rgb(0 0 0 / .06), 0 12px 32px rgb(0 0 0 / .08);
  --radius-card: 14px;
  --radius-btn: 999px;
  --font-head: Optima, Candara, 'Segoe UI', 'Noto Sans', sans-serif;
  --font-body: Georgia, Cambria, 'Times New Roman', serif;
}

/* Base */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background-color: var(--bg);
  background-image: repeating-linear-gradient(135deg, var(--bg) 0 88px, var(--bg-alt) 88px 176px);
  color: var(--text);
  font-family: var(--font-body);
  font-size: clamp(1rem, 0.96rem + 0.2vw, 1.125rem);
  line-height: 1.7;
}
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0 0 0.5em;
  color: var(--text);
}
h1 { font-size: clamp(2.4rem, 4.6vw + 0.6rem, 4.6rem); line-height: 1.08; letter-spacing: -0.02em; }
h2 { font-size: clamp(1.8rem, 2.6vw + 0.8rem, 3rem); }
h3 { font-size: clamp(1.2rem, 1vw + 0.9rem, 1.5rem); }
p { margin: 0 0 1em; }
a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1.5px; }
a:hover { color: var(--accent-dark); background-color: rgb(154 79 20 / 0.12); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

/* Layout */
.l-wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 clamp(16px, 4vw, 40px);
}
.l-band { padding: clamp(64px, 7vw, 96px) 0; }
.l-band-intro {
  font-family: var(--font-head);
  color: var(--muted);
  max-width: 60ch;
  margin: 0 0 clamp(16px, 2vw, 24px);
  font-size: clamp(1.05rem, 0.6vw + 0.9rem, 1.3rem);
}
.l-two-col {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(24px, 4vw, 48px);
  align-items: center;
}
.l-grid {
  display: grid;
  grid-template-columns: 1fr;
  align-items: stretch;
  gap: clamp(20px, 3vw, 32px);
}
.u-prose { max-width: 760px; }
.u-prose p { max-width: 68ch; }
.u-prose ul, .u-prose ol { max-width: 68ch; padding-left: 1.4em; }
.u-prose table { border-collapse: collapse; width: 100%; max-width: 68ch; margin: 1em 0; }
.u-prose th, .u-prose td { border: 1px solid var(--line); padding: 10px 12px; text-align: left; }
.u-prose th { font-family: var(--font-head); }
.u-prose h2 { margin-top: 1.6em; }

/* Typography accent */
.u-accent {
  display: inline-block;
  font-family: var(--font-head);
  font-weight: 800;
  font-size: clamp(2.4rem, 5vw + 0.6rem, 5.2rem);
  line-height: 1.05;
  color: var(--accent);
}

/* Reveal */
html.has-js .u-reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
html.has-js .u-reveal.is-shown {
  opacity: 1;
  transform: none;
}

/* Skip link */
.c-skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--plate-bg);
  color: var(--plate-text);
  padding: 12px 20px;
  border-radius: 0 0 var(--radius-btn) 0;
  z-index: 100;
  text-decoration: none;
}
.c-skip:focus { left: 0; }

/* Note band */
.c-note-band {
  background: var(--accent);
  color: var(--accent-text);
}
.c-note-text {
  max-width: 1200px;
  margin: 0 auto;
  padding: 10px clamp(16px, 4vw, 40px);
  font-family: var(--font-head);
  font-size: 0.95rem;
}

/* Header */
.c-topbar {
  background: var(--surface);
  border-bottom: 6px solid var(--accent);
}
.c-topbar-row {
  display: flex;
  flex-direction: column-reverse;
  align-items: stretch;
  gap: 0;
  min-height: 64px;
}
.c-brand {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: clamp(1.25rem, 2vw, 1.6rem);
  color: var(--text);
  text-decoration: none;
  display: flex;
  align-items: center;
  min-height: 64px;
}
.c-menu-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: none;
  flex-direction: column;
}
.has-menu-open .c-menu-list { display: flex; }
.c-menu-list ul { display: block; }
.c-menu-link {
  display: block;
  font-family: var(--font-head);
  font-size: 1.05rem;
  color: var(--text);
  text-decoration: none;
  padding: 14px 4px;
  border-top: 1px solid var(--line);
  position: relative;
  transition: color 0.25s ease, background-size 0.25s ease;
  background-image: linear-gradient(var(--accent), var(--accent));
  background-repeat: no-repeat;
  background-size: 0% 3px;
  background-position: 0 calc(100% - 6px);
}
.c-menu-link:hover, .c-menu-link:focus-visible {
  color: var(--accent-dark);
  background-size: 100% 3px;
}
.c-menu-link[aria-current="page"] { color: var(--accent); font-weight: 700; }
.c-menu-link[aria-current="page"]::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  margin-right: 8px;
  animation: c-dot-pulse 1.8s ease-in-out infinite;
}
@keyframes c-dot-pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.5); opacity: 0.6; }
}
.c-menu-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-head);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  background: none;
  border: 0;
  padding: 12px 0;
  cursor: pointer;
}
.c-menu-btn-bar, .c-menu-btn-bar::before, .c-menu-btn-bar::after {
  display: block;
  width: 22px;
  height: 3px;
  border-radius: 2px;
  background: var(--text);
  transition: transform 0.25s ease, opacity 0.25s ease;
}
.c-menu-btn-bar { position: relative; }
.c-menu-btn-bar::before, .c-menu-btn-bar::after { content: ""; position: absolute; left: 0; }
.c-menu-btn-bar::before { top: -7px; }
.c-menu-btn-bar::after { top: 7px; }
.has-menu-open .c-menu-btn-bar { background: transparent; }
.has-menu-open .c-menu-btn-bar::before { transform: translateY(7px) rotate(45deg); }
.has-menu-open .c-menu-btn-bar::after { transform: translateY(-7px) rotate(-45deg); }

/* Buttons */
.c-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 14px 28px;
  border: 2px solid var(--accent);
  border-radius: var(--radius-btn);
  background-image: linear-gradient(120deg, var(--accent) 0%, var(--accent-dark) 100%);
  background-color: var(--accent);
  background-size: 200% 100%;
  background-position: 0% 0%;
  color: var(--accent-text);
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  cursor: pointer;
  transition: background-position 0.35s ease, background-color 0.25s ease, transform 0.15s ease;
}
.c-btn:hover {
  background-color: var(--accent-dark);
  background-position: 100% 0%;
}
.c-btn:focus-visible {
  outline: 3px solid var(--text);
  outline-offset: 3px;
  box-shadow: 0 0 0 7px rgb(154 79 20 / 0.3);
}
.c-btn:active { transform: scale(0.97); }
.c-btn:disabled { opacity: 0.6; cursor: wait; }
.c-btn-alt {
  background: none;
  border: 2px solid var(--text);
  color: var(--text);
}
.c-btn-alt:hover { background-color: var(--text); color: var(--bg); }

/* Hero */
.l-band-hero { padding-top: clamp(48px, 6vw, 88px); }
.c-hero-copy { text-align: center; max-width: 820px; margin: 0 auto clamp(32px, 4vw, 56px); }
.c-hero-title { font-size: clamp(2.2rem, 4.2vw + 0.6rem, 4.2rem); }
.c-hero-line { display: block; }
html.has-js .c-hero-line {
  opacity: 1;
  transform: translateY(0);
  animation: c-rise 0.7s ease both;
}
html.has-js .c-hero-line:nth-child(2) { animation-delay: 0.15s; }
html.has-js .c-hero-line:nth-child(3) { animation-delay: 0.3s; }
@keyframes c-rise { from { transform: translateY(8px); } to { transform: translateY(0); } }
.c-hero-lead {
  color: var(--muted);
  font-size: clamp(1.1rem, 0.8vw + 0.9rem, 1.4rem);
  max-width: 56ch;
  margin: 0 auto 24px;
}
.c-hero-collage {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
.c-hero-wide, .c-hero-square, .c-photo, .c-card-img {
  width: 100%;
  object-fit: cover;
  border-radius: 8px;
}
.c-hero-wide { aspect-ratio: 16 / 9; }
.c-hero-square { aspect-ratio: 1 / 1; max-width: 480px; margin: 0 auto; }

/* Plate */
.c-plate {
  background: var(--plate-bg);
  color: var(--plate-text);
  border-radius: var(--radius-card);
  padding: 28px 40px;
  max-width: 720px;
  margin: 0 auto;
  box-shadow: var(--shadow);
}
.c-plate-text {
  font-family: var(--font-head);
  font-size: clamp(1.2rem, 1vw + 0.9rem, 1.6rem);
  line-height: 1.6;
  margin: 0;
}

/* Cards */
.c-card {
  background: var(--surface);
  border-radius: var(--radius-card);
  padding: clamp(24px, 3vw, 32px);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.c-card:hover, .c-card:focus-within {
  transform: translateY(-4px);
  box-shadow: 0 2px 4px rgb(0 0 0 / .07), 0 18px 40px rgb(0 0 0 / .12);
}
.c-card p { color: var(--muted); margin-bottom: 0; }
.c-card.has-media { padding: 0; overflow: hidden; }
.c-card.has-media h3, .c-card.has-media p { padding: 20px 24px 24px; margin: 0; }
.c-card.has-media h3 { padding-top: 20px; }
.c-card-img {
  aspect-ratio: 3 / 4;
  border-radius: 0;
  transition: transform 0.5s ease;
}
.c-card.has-media:hover .c-card-img, .c-card.has-media:focus-within .c-card-img {
  transform: scale(1.05);
}
.c-photo { aspect-ratio: 4 / 3; box-shadow: var(--shadow); }

/* Tabs */
.c-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 24px;
}
.c-tab {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 1rem;
  color: var(--muted);
  background: var(--surface);
  border: 2px solid var(--line);
  border-radius: var(--radius-btn);
  padding: 10px 22px;
  min-height: 44px;
  cursor: pointer;
  transition: color 0.25s ease, border-color 0.25s ease, background-color 0.25s ease;
}
.c-tab:hover { color: var(--accent-dark); border-color: var(--accent); }
.c-tab:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.c-tab:active { transform: scale(0.97); }
.c-tab.is-active {
  color: var(--accent-text);
  background: var(--accent);
  border-color: var(--accent);
}
.is-hidden { display: none; }

/* Table */
.c-table-wrap { overflow-x: auto; }
.c-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  border-radius: var(--radius-card);
  overflow: hidden;
  box-shadow: var(--shadow);
  min-width: 480px;
}
.c-table th, .c-table td {
  padding: 14px 18px;
  text-align: left;
  border-bottom: 1px solid var(--line);
}
.c-table thead th {
  font-family: var(--font-head);
  background: var(--plate-bg);
  color: var(--plate-text);
}
.c-table th[scope="row"] { font-family: var(--font-head); }
.c-table tbody tr:last-child th, .c-table tbody tr:last-child td { border-bottom: 0; }

/* FAQ */
.c-faq { display: grid; gap: 12px; max-width: 760px; }
.c-faq-item {
  background: var(--surface);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow);
  padding: 0;
}
.c-faq-item summary {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 1.1rem;
  padding: 18px 24px;
  cursor: pointer;
  list-style: none;
  position: relative;
  padding-right: 48px;
}
.c-faq-item summary::-webkit-details-marker { display: none; }
.c-faq-item summary::after {
  content: "+";
  position: absolute;
  right: 22px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.4rem;
  color: var(--accent);
  transition: transform 0.3s ease;
}
.c-faq-item[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.c-faq-item p { padding: 0 24px 20px; margin: 0; color: var(--muted); }

/* Form */
.c-form-wrap { max-width: 640px; }
.c-form { display: grid; gap: 18px; }
.c-field { display: grid; gap: 6px; }
.c-field-label {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 1rem;
}
.c-input, .c-textarea {
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--text);
  background: var(--surface);
  border: 2px solid var(--line);
  border-radius: 10px;
  padding: 12px 14px;
  min-height: 48px;
  transition: border-color 0.25s ease;
}
.c-input::placeholder { color: var(--muted); opacity: 1; }
.c-input:hover, .c-textarea:hover { border-color: var(--muted); }
.c-input:focus-visible, .c-textarea:focus-visible {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgb(154 79 20 / 0.18);
}
.c-textarea { min-height: auto; resize: vertical; }
.is-invalid .c-input, .c-input.is-invalid { border-color: #A32B0E; }
.c-check { display: flex; gap: 10px; align-items: flex-start; font-size: 0.95rem; }
.c-check input { width: 20px; height: 20px; margin-top: 3px; accent-color: var(--accent); flex: none; }
.c-form-note { color: var(--muted); font-size: 0.95rem; margin: 0; }
.c-form-btn { justify-self: start; }
.c-form.is-sending .c-form-btn { opacity: 0.6; pointer-events: none; }

/* Dock */
.c-dock {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 50;
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  background: linear-gradient(to top, var(--bg) 60%, transparent);
  display: none;
}
.c-dock-link { width: 100%; }

/* Footer */
.l-footer {
  background: var(--surface);
  border-top: 6px solid var(--accent);
  padding: clamp(48px, 6vw, 80px) 0 24px;
}
.l-footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(24px, 4vw, 48px);
}
.l-footer-title {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.1rem;
  margin: 0 0 12px;
  color: var(--text);
}
.l-footer-text { color: var(--muted); font-size: 0.95rem; }
.l-footer-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.l-footer-list a { color: var(--muted); text-decoration: none; font-size: 0.95rem; }
.l-footer-list a:hover, .l-footer-list a:focus-visible { color: var(--accent-dark); text-decoration: underline; }
.l-footer-col address { font-style: normal; color: var(--muted); font-size: 0.95rem; }
.l-footer-col address p { margin: 0 0 8px; }
.l-footer-col ul:not(.l-footer-list) { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 6px; font-size: 0.95rem; }
.l-footer-col ul:not(.l-footer-list) span { font-family: var(--font-head); font-weight: 600; color: var(--text); margin-right: 6px; }
.l-footer-bottom {
  border-top: 1px solid var(--line);
  margin-top: clamp(32px, 4vw, 48px);
  padding-top: 20px;
}
.l-footer-copy { color: var(--muted); font-size: 0.95rem; margin: 0; }

/* Inner pages */
.c-page-head { padding-top: clamp(40px, 6vw, 72px); }
.c-page-head h1 { margin-bottom: 0.4em; }
.c-page-lead {
  color: var(--muted);
  font-size: clamp(1.1rem, 0.7vw + 0.9rem, 1.35rem);
  max-width: 60ch;
}
.c-steps { counter-reset: step; list-style: none; padding: 0; display: grid; gap: 16px; max-width: 760px; }
.c-steps li {
  counter-increment: step;
  background: var(--surface);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow);
  padding: 20px 24px 20px 64px;
  position: relative;
}
.c-steps li::before {
  content: counter(step);
  position: absolute;
  left: 20px;
  top: 20px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-text);
  font-family: var(--font-head);
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}
.c-steps li p { margin: 0; color: var(--muted); }
.c-steps li strong { font-family: var(--font-head); color: var(--text); }
.c-contacts-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.c-contacts-list span { font-family: var(--font-head); font-weight: 600; display: block; }
.c-contacts-list a { font-size: 1.1rem; }
.c-thanks-box, .c-404-box {
  background: var(--surface);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow);
  padding: clamp(28px, 4vw, 48px);
  max-width: 760px;
}

/* Breakpoints */
@media (min-width: 480px) {
  .l-footer-grid { grid-template-columns: 1fr 1fr; }
  .c-hero-collage { grid-template-columns: 2fr 1fr; align-items: stretch; }
  .c-hero-square { max-width: none; }
  .c-hero-wide { aspect-ratio: 16 / 9; height: 100%; }
  .c-hero-square { aspect-ratio: auto; height: 100%; min-height: 0; }
}
@media (min-width: 640px) {
  .l-grid { grid-template-columns: repeat(2, 1fr); }
  .c-dock { display: block; }
}
@media (min-width: 768px) {
  .l-two-col { grid-template-columns: 1.15fr 0.85fr; }
  .c-two-col-text { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(24px, 4vw, 48px); }
}
@media (min-width: 1024px) {
  .l-grid { grid-template-columns: repeat(3, 1fr); }
  .l-grid.has-two { grid-template-columns: repeat(2, 1fr); }
  .c-topbar-row { flex-direction: row; align-items: center; justify-content: space-between; }
  .c-menu-btn { display: none; }
  .c-menu-list { display: flex !important; flex-direction: row; gap: 4px; }
  .c-menu-link { border-top: 0; padding: 10px 14px; }
  .c-dock { display: none; }
}
@media (min-width: 1280px) {
  .l-band { padding: 96px 0; }
}

/* Motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html.has-js .u-reveal { opacity: 1; transform: none; }
}

/* Mobile hero title */
@media (max-width: 479px) {
  .c-hero-title { font-size: clamp(2rem, 8vw, 2.15rem); }
  .c-hero-lead { font-size: 1.05rem; }
  .c-plate { padding: 24px 28px; }
}
