/* Fonts are self-hosted (webapp/fonts, SIL Open Font License - see LICENSE-*.txt there)
   instead of loaded from Google Fonts: one less third-party connection (faster first
   paint), and no visitor IP addresses sent to Google. Latin subset only - the same
   as what browsers actually used from Google's CSS for the site's Latin-script
   languages; Japanese/Korean/Chinese/Arabic text uses the system fonts as before.
   Fraunces carries the optical-size axis, so headings render exactly as they did. */
@font-face {
  font-family: 'Fraunces';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/fonts/fraunces-latin-opsz.woff2') format('woff2');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
@font-face {
  font-family: 'Work Sans';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/fonts/work-sans-latin-wght.woff2') format('woff2');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
:root {
  --ink: #24313A;
  --ink-soft: #4A5A60;
  --paper: #F3EEE2;
  --paper-alt: #E9E1CC;
  --card: #FBF9F3;
  --accent: #3F6657;      /* deep sage - primary actions */
  --accent-dark: #2E4D42;
  --warm: #C97A3E;        /* burnt clay - secondary highlight */
  --line: rgba(36, 49, 58, 0.14);
  --error: #A83B32;
  --radius: 10px;
  --max-width: 1080px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: 'Work Sans', system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

/* Hidden until i18n.js applies translations - but ONLY when the visitor is about to be
   shown a non-English language (the head script on every page sets i18n-pending from the
   saved language or the browser language). English visitors, search-engine crawlers and
   anyone without JavaScript see the page immediately: hiding it behind an API call delayed
   the first paint (bad for Core Web Vitals) and left the page blank without JS. i18n.js still
   adds i18n-ready, with its own safety timeout, so this is never permanent. */
html.i18n-pending body:not(.i18n-ready) { visibility: hidden; }

h1, h2, h3, .display {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 600;
  line-height: 1.12;
  margin: 0 0 0.4em;
  color: var(--ink);
}

h1 { font-size: clamp(2rem, 5.5vw, 3.4rem); letter-spacing: -0.01em; }
h2 { font-size: clamp(1.5rem, 3.4vw, 2.1rem); }
h3 { font-size: 1.15rem; }

p { margin: 0 0 1em; max-width: 62ch; }
a { color: var(--accent-dark); }

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

/* --- Header / nav --- */
header.site {
  border-bottom: 1px solid var(--line);
  background: var(--paper);
  position: sticky;
  top: 0;
  z-index: 20;
}

.nav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  max-width: var(--max-width);
  margin: 0 auto;
  gap: 12px;
  flex-wrap: wrap;
}

.brand {
  font-family: 'Fraunces', serif;
  font-weight: 600;
  font-size: 1.25rem;
  text-decoration: none;
  color: var(--ink);
}

nav.links {
  display: flex;
  gap: 22px;
  flex-wrap: wrap;
  align-items: center;
}

nav.links a {
  text-decoration: none;
  color: var(--ink-soft);
  font-size: 0.95rem;
}
nav.links a:hover { color: var(--ink); }

select#langSwitcher {
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink);
  border-radius: 6px;
  padding: 6px 8px;
  font-family: inherit;
  font-size: 0.9rem;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-family: 'Work Sans', sans-serif;
  font-weight: 500;
  font-size: 0.98rem;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.12s ease, background 0.15s ease;
}
.btn:active { transform: translateY(1px); }

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

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

.btn-block { width: 100%; }

/* --- Hero --- */
.hero {
  padding: 64px 0 56px;
}
.hero .container {
  max-width: 1040px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 32px;
  align-items: start;
}
/* Only collapses to stacked for genuinely narrow (phone-width) viewports -
   760px was too conservative and could still collapse on a real 13" laptop
   under moderate browser zoom or a non-maximized window; 13"+ laptops are
   virtually always well above 600px of logical viewport width even then. */
@media (max-width: 600px) {
  .hero-grid { grid-template-columns: 1fr; }
}

.hero-pricing .pricing-card { margin-left: auto; margin-right: auto; }
@media (min-width: 601px) {
  .hero-pricing .pricing-card { margin-left: 0; }
}

.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 28px; }

.about-grid {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 32px;
  align-items: center;
}
@media (max-width: 620px) {
  .about-grid { grid-template-columns: 1fr; justify-items: center; text-align: center; }
}
.about-photo {
  width: 16.6vw;
  height: 16.6vw;
  min-width: 110px;
  min-height: 110px;
  max-width: 220px;
  max-height: 220px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--card);
  box-shadow: 0 10px 24px rgba(36,49,58,0.12);
}

/* --- Sections --- */
section { padding: 56px 0; }
section.alt { background: var(--paper-alt); }

.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  margin-top: 32px;
}
@media (max-width: 760px) {
  .steps-grid { grid-template-columns: 1fr; }
}
.step {
  border-top: 2px solid var(--accent);
  padding-top: 14px;
}
.step .num {
  font-family: 'Fraunces', serif;
  font-size: 1.6rem;
  color: var(--accent-dark);
  display: block;
  margin-bottom: 6px;
}

.pricing-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px;
  max-width: 420px;
  margin-top: 24px;
}
.pricing-card .price {
  font-family: 'Fraunces', serif;
  font-size: 2.6rem;
  color: var(--accent-dark);
}
.pricing-card .price span { font-size: 1rem; color: var(--ink-soft); font-family: 'Work Sans', sans-serif; }

.faq-item {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  margin-bottom: 12px;
  overflow: hidden;
}
.faq-item summary {
  padding: 16px 20px;
  cursor: pointer;
  font-family: 'Fraunces', serif;
  font-weight: 500;
  font-size: 1.05rem;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: '+';
  font-family: 'Work Sans', sans-serif;
  font-size: 1.4rem;
  color: var(--accent-dark);
  flex-shrink: 0;
  transition: transform 0.15s ease;
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item .faq-answer {
  padding: 0 20px 18px;
  color: var(--ink-soft);
}
.faq-item .faq-answer p { margin: 0; }

/* --- Forms --- */
.form-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px;
  max-width: 460px;
  margin: 40px auto;
}
.field { margin-bottom: 18px; }
.field label {
  display: block;
  font-size: 0.9rem;
  color: var(--ink-soft);
  margin-bottom: 6px;
}
.field input, .field select, .field textarea {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  font-family: inherit;
  font-size: 1rem;
  color: var(--ink);
}
.field textarea { resize: vertical; min-height: 80px; }
.hint, .field .hint { font-size: 0.8rem; color: var(--ink-soft); margin-top: 4px; }

.form-footer {
  margin-top: 16px;
  font-size: 0.9rem;
  color: var(--ink-soft);
  text-align: center;
}

.alert {
  padding: 12px 14px;
  border-radius: 8px;
  font-size: 0.92rem;
  margin-bottom: 16px;
}
.alert-error { background: #F8E7E4; color: var(--error); border: 1px solid #EAC1BB; }
.alert-success { background: #E7EFE9; color: var(--accent-dark); border: 1px solid #C7DACE; }
.alert-warning { background: #FBF1DA; color: #7A5B12; border: 1px solid #EBD79C; line-height: 1.5; }

/* --- Booking slots --- */
.slot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
  gap: 10px;
  margin: 16px 0 24px;
}
.slot-btn {
  padding: 10px 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.9rem;
  text-align: center;
}
.slot-btn.selected { background: var(--accent); color: #fff; border-color: var(--accent); }
.slot-btn:hover { border-color: var(--accent); }

.schedule-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 16px 0 28px;
}
.schedule-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--card);
  flex-wrap: wrap;
}
.schedule-row .time {
  font-weight: 500;
  min-width: 70px;
}
.schedule-row .detail {
  flex: 1;
  color: var(--ink-soft);
  font-size: 0.88rem;
  min-width: 160px;
}
.schedule-row.blocked { background: #F1E1DE; }
.schedule-row.booked { background: #DCEBE1; }
.schedule-row .btn { padding: 7px 16px; font-size: 0.86rem; }

.inbox-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: 8px;
  background: var(--card);
  margin-bottom: 8px;
  flex-wrap: wrap;
}
.inbox-row .who { font-weight: 500; }
.inbox-row .when { font-size: 0.82rem; color: var(--ink-soft); }
.unread-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--warm);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 600;
}

/* --- Tables / lists (dashboard, admin) --- */
table.data {
  width: 100%;
  border-collapse: collapse;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
table.data th, table.data td {
  text-align: left;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  font-size: 0.92rem;
}
table.data th {
  background: var(--paper-alt);
  font-weight: 500;
  color: var(--ink-soft);
}
table.data tr:last-child td { border-bottom: none; }

.status-pill {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 500;
}
.status-PENDING_PAYMENT { background: #F3E6CF; color: #8A5A16; }
.status-CONFIRMED { background: #DCEBE1; color: var(--accent-dark); }
.status-CANCELLED { background: #F1E1DE; color: var(--error); }

/* --- Messages / chat thread --- */
.thread {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  padding: 18px;
  max-height: 420px;
  overflow-y: auto;
  margin-bottom: 14px;
}
.msg {
  max-width: 78%;
  margin-bottom: 12px;
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 0.94rem;
}
.msg.mine {
  background: var(--accent);
  color: #fff;
  margin-left: auto;
  border-bottom-right-radius: 2px;
}
.msg.theirs {
  background: var(--paper-alt);
  border-bottom-left-radius: 2px;
}
.msg .meta { font-size: 0.72rem; opacity: 0.75; margin-top: 4px; }
.msg .translated {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(255,255,255,0.25);
  font-style: italic;
  opacity: 0.9;
}
.msg.theirs .translated { border-top-color: rgba(36,49,58,0.15); }
.msg .translated .translated-label {
  display: block;
  font-size: 0.7rem;
  font-style: normal;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  opacity: 0.75;
  margin-bottom: 2px;
}

.chat-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}
.chat-header .btn { padding: 8px 16px; font-size: 0.88rem; }

.message-form { display: flex; gap: 10px; }
.message-form textarea { flex: 1; }

footer.site {
  border-top: 1px solid var(--line);
  padding: 32px 0;
  margin-top: 40px;
  color: var(--ink-soft);
  font-size: 0.88rem;
}
footer.site .container { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; }

.section-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
