/* =========================================================================
   SkyLoft — base styles shared by the public site, the guest area and the admin.
   Hand-written, no build step. Page-specific styles: site.css, guest.css, admin.css.
   Design language: warm editorial hospitality. Serif display (Fraunces) +
   clean sans body (Manrope), cream/charcoal base with a terracotta accent.
   ========================================================================= */

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body, h1, h2, h3, h4, p, figure, blockquote, dl, dd { margin: 0; }
ul[class], ol[class] { list-style: none; margin: 0; padding: 0; }
img, picture { max-width: 100%; display: block; }
input, button, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
table { border-collapse: collapse; width: 100%; }

@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; }
}

/* ---------- Design tokens ---------- */
:root {
  /* base palette */
  --cream: #f6f1e7;
  --cream-deep: #efe6d4;
  --charcoal: #211c15;
  --charcoal-soft: #4a4237;
  --brown-muted: #6f6556;      /* small text on cream: ≥ 4.5:1 */
  --terracotta: #c1673b;
  --terracotta-dark: #a3502b;
  --gold: #c99a4a;
  --line: #e4dac8;
  --white: #fffdf9;
  --brand: #1c3c2f;            /* logo green */

  /* "Dolomiti" palette (public site) */
  --night: #1c2140;
  --night-soft: #2c2f55;
  --dusk: #4b3f6b;
  --rose: #e48b7d;
  --rose-deep: #c9677a;
  --rose-ink: #a84a5e;         /* rose for text/links: ≥ 4.5:1 */
  --apricot: #f4b98d;
  --pine: #2c3b35;

  /* status colours: text / background / border */
  --success: #3f7d52;
  --success-bg: #e2f0e6;
  --success-line: #c6e0cd;
  --warning: #7a5a17;
  --warning-bg: #fbf1de;
  --warning-line: #f0dcb1;
  --danger: #b3452f;
  --danger-bg: #fbe9e3;
  --danger-line: #f2c8ba;
  --focus: #1c5fd0;

  --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --font-body: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --fs-xs: .75rem;
  --fs-sm: .85rem;
  --fs-md: .92rem;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --radius-pill: 999px;
  --shadow-soft: 0 10px 40px -12px rgba(33, 28, 21, 0.25);
  --shadow-card: 0 2px 14px rgba(33, 28, 21, 0.06);
  --ease: cubic-bezier(.22, 1, .36, 1);

  /* layout: page width, and the space above and below a section (phones 60 px, desktop 72 px) */
  --wrap: 1160px;
  --space-section: clamp(60px, 6vw, 72px);
}

html, body { background: var(--cream); color: var(--charcoal); font-family: var(--font-body); }
body { font-size: 16px; line-height: 1.6; -webkit-font-smoothing: antialiased; }

h1, h2, h3 { font-family: var(--font-display); font-weight: 500; line-height: 1.12; letter-spacing: -0.01em; color: var(--charcoal); }
h1 { font-size: clamp(2.4rem, 5vw + 1rem, 4.2rem); }
h2 { font-size: clamp(1.7rem, 2.6vw + 1rem, 2.6rem); margin-bottom: .5em; }
h3 { font-size: 1.15rem; margin-bottom: .3em; }
p { color: var(--charcoal-soft); }
.muted { color: var(--brown-muted); }
.small { font-size: var(--fs-sm); }
.text-danger { color: var(--danger); }
code { background: var(--cream-deep); padding: .1em .4em; border-radius: 4px; font-size: .9em; }

/* Keyboard focus: always visible (mouse clicks don't show it). */
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 2000; background: var(--charcoal); color: var(--white); padding: 10px 16px; border-radius: var(--radius-sm); font-weight: 700; }
.skip-link:focus { top: 12px; }

.eyebrow {
  font-family: var(--font-body); font-weight: 700; text-transform: uppercase;
  letter-spacing: .14em; font-size: .78rem; color: var(--terracotta-dark); margin-bottom: .75em;
}

.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: 24px; }
.wrap--narrow { max-width: 640px; }
@media (max-width: 520px) { .wrap { padding-inline: 16px; } }

.icon { width: 1.3em; height: 1.3em; flex: none; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  padding: .85em 1.6em; border-radius: var(--radius-pill); font-weight: 600; font-size: .95rem;
  border: 1px solid transparent; transition: transform .25s var(--ease), box-shadow .25s var(--ease), background .25s var(--ease);
  white-space: nowrap;
}
.btn--primary { background: var(--terracotta-dark); color: var(--white); box-shadow: 0 8px 20px -8px rgba(193, 103, 59, .6); }
.btn--primary:hover { background: #8c4424; transform: translateY(-1px); }
.btn--secondary { background: transparent; border-color: var(--charcoal); color: var(--charcoal); }
.btn--secondary:hover { background: var(--charcoal); color: var(--white); }
.btn--danger { background: transparent; border-color: var(--danger); color: var(--danger); }
.btn--danger:hover { background: var(--danger); color: var(--white); }
.btn--sm { padding: .55em 1.1em; font-size: var(--fs-sm); }
.btn--lg { padding: 1em 2.2em; font-size: 1.02rem; }
.btn--block { width: 100%; }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; box-shadow: none; }
.button-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }

.link-btn { background: none; border: none; padding: 0; font-weight: 600; text-decoration: underline; color: var(--charcoal-soft); }
.link-btn--danger { color: var(--danger); }

/* ---------- Brand ---------- */
.brand { display: flex; align-items: center; gap: .6em; font-family: var(--font-display); font-size: 1.15rem; }
.brand__mark {
  /* SkyLoft logo (deer + Dolomites), tinted with background-color through a mask so it suits light and dark areas. */
  display: inline-block; flex: none; width: 44px; height: 48px; background: var(--brand);
  -webkit-mask: url(/assets/img/logo.svg) center / contain no-repeat; mask: url(/assets/img/logo.svg) center / contain no-repeat;
}
.brand__name { display: flex; flex-direction: column; line-height: 1; }
.brand__name small { font-family: var(--font-body); font-size: .62rem; font-weight: 700; letter-spacing: .28em; text-transform: uppercase; color: var(--brown-muted); margin-top: 4px; }

/* ---------- Cards / forms / tables ---------- */
.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 28px; box-shadow: var(--shadow-card); margin-bottom: 24px; }
.card h2 { font-size: 1.25rem; }
.card h3 { font-size: 1.05rem; margin: 1.4em 0 .5em; }
.card--accent { border-color: var(--terracotta); box-shadow: 0 10px 30px -14px rgba(193, 103, 59, .5); }
@media (max-width: 520px) { .card { padding: 20px; } }

.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.field label { font-size: .82rem; font-weight: 700; color: var(--charcoal-soft); }
.field input, .field textarea, .field select {
  border: 1px solid var(--line); border-radius: var(--radius-sm); padding: .75em .9em; background: var(--cream);
  transition: border-color .2s; max-width: 100%;
}
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--terracotta); background: var(--white); }
.field textarea { min-height: 120px; resize: vertical; font-family: inherit; }
.field--grow { flex: 1 1 220px; min-width: 0; }
.field--grow select { width: 100%; }
.field[hidden] { display: none; }
.field--invalid input, .field--invalid select { border-color: var(--danger); background: #fdf3f0; }
fieldset.field--invalid { border-color: var(--danger); }
.field-error { color: var(--danger); font-size: .78rem; font-weight: 600; }
.field-hint { color: var(--brown-muted); font-size: .78rem; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); gap: 0 16px; }
.choice { display: flex; align-items: center; gap: 10px; padding: 8px 0; font-weight: 600; }
.choice--block { display: flex; }

.inline-form { display: flex; flex-wrap: wrap; gap: 14px; align-items: end; margin-bottom: 20px; }
.stacked-form { max-width: 560px; }

.alert { padding: 14px 18px; border-radius: var(--radius-sm); margin-bottom: 20px; font-size: var(--fs-md); }
.alert--error { background: var(--danger-bg); color: var(--danger); border: 1px solid var(--danger-line); }
.alert--success { background: var(--success-bg); color: var(--success); border: 1px solid var(--success-line); }

.notice { background: var(--warning-bg); border: 1px solid var(--warning-line); color: var(--warning); padding: 12px 16px; border-radius: var(--radius-sm); margin-bottom: 20px; font-size: var(--fs-md); }
.notice--error { background: var(--danger-bg); border-color: var(--danger-line); color: var(--danger); }
.notice--ok { background: var(--success-bg); border-color: var(--success-line); color: var(--success); }

.table { font-size: var(--fs-md); }
.table th, .table td { text-align: left; padding: 12px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table th { font-size: .74rem; text-transform: uppercase; letter-spacing: .06em; color: var(--brown-muted); font-weight: 700; }
.table td.num, .table th.num { text-align: right; }
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin-bottom: 8px; }
.table-wrap > .table { min-width: 560px; }

.badge { display: inline-block; padding: .25em .7em; border-radius: var(--radius-pill); font-size: .74rem; font-weight: 700; background: var(--cream-deep); color: var(--charcoal-soft); white-space: nowrap; }
.badge--confirmed, .badge--ok { background: var(--success-bg); color: var(--success); }
.badge--pending, .badge--warn { background: var(--warning-bg); color: #8a6414; }
.badge--cancelled, .badge--muted { background: #f2e5e0; color: var(--brown-muted); }
.badge--danger { background: var(--danger-bg); color: var(--danger); }

.copy-field input { width: 100%; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: .8em 1em; background: var(--cream-deep); font-family: monospace; font-size: var(--fs-sm); }

.prose p { margin: 0 0 .9em; line-height: 1.65; }
.prose a { color: var(--terracotta-dark); text-decoration: underline; word-break: break-word; }

/* weather temperatures (public weather and guest area) */
.wx-max { font-family: var(--font-display); font-size: 1.8rem; line-height: 1; color: var(--charcoal); }
.wx-min { margin-left: 8px; font-size: 1.1rem; color: var(--brown-muted); }

.staging-banner { position: sticky; top: 0; z-index: 1000; background: repeating-linear-gradient(45deg, #f6c343, #f6c343 12px, #f2b824 12px, #f2b824 24px); color: #2a1f00; text-align: center; font: 700 .82rem/1.3 var(--font-body); padding: 7px 14px; letter-spacing: .02em; }

/* error page detail (admin with APP_DEBUG only) */
.error-detail { text-align: left; white-space: pre-wrap; background: var(--cream-deep); padding: 14px; border-radius: var(--radius-sm); font-size: .8rem; overflow-x: auto; }
