/* Yomox Laravel Test: small hand-written stylesheet, no build step.
   Tokens: spacing 4/8/12/16/24/32/48/64/96, type 12/14/16/20/24/30/40+. */

:root {
  --accent: #ff6a3d;
  --accent-2: #e0245e;
  --accent-text: #ff8a63;
  --on-accent: #1a0a05;
  --radius: 12px;
  --radius-sm: 8px;
  --container: 1120px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-hero: Verdana, Geneva, sans-serif;
  color-scheme: dark;
}

/* Dark is the default theme */
:root,
[data-theme="dark"] {
  --bg: #0f1115;
  --bg-alt: #151922;
  --surface: #1b202b;
  --border: #2a3140;
  --text: #e9ecf2;
  --text-muted: #a7afbf;
  --ok: #3ddc84;
  --bad: #ff5c5c;
  --shadow: 0 1px 2px rgb(0 0 0 / 0.4), 0 8px 24px rgb(0 0 0 / 0.25);
  --nav-bg: rgb(15 17 21 / 0.85);
}

[data-theme="light"] {
  color-scheme: light;
  --bg: #ffffff;
  --bg-alt: #f5f6f9;
  --surface: #ffffff;
  --border: #dde1e8;
  --text: #161a22;
  --text-muted: #525b6b;
  --accent-text: #c2410c;
  --ok: #138a4a;
  --bad: #c62828;
  --shadow: 0 1px 2px rgb(16 24 40 / 0.06), 0 8px 24px rgb(16 24 40 / 0.08);
  --nav-bg: rgb(255 255 255 / 0.88);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--accent-text); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 680px; }

.skip-link {
  position: absolute; left: 16px; top: -48px; z-index: 100;
  background: var(--accent); color: var(--on-accent); padding: 8px 16px; border-radius: var(--radius-sm);
  font-weight: 600; text-decoration: none;
}
.skip-link:focus { top: 12px; }

/* ── Navbar ─────────────────────────────────────────── */
.navbar {
  position: sticky; top: 0; z-index: 50;
  background: var(--nav-bg);
  backdrop-filter: saturate(160%) blur(10px);
  -webkit-backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--border);
}
.navbar-inner { display: flex; align-items: center; gap: 24px; min-height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--text); text-decoration: none; font-weight: 700; font-size: 18px; white-space: nowrap; }
.logo-mark { flex: none; }
.brand-accent { color: var(--accent-text); }
.nav-links { display: flex; gap: 24px; margin-left: auto; }
.nav-links a { color: var(--text-muted); text-decoration: none; font-weight: 500; font-size: 15px; padding: 8px 0; }
.nav-links a:hover { color: var(--text); }

/* iPhone-style switch: pill track, sliding round knob. "On" = light mode. */
.theme-switch {
  flex: none; padding: 4px; margin: 0; border: 0; background: none; cursor: pointer; border-radius: 999px;
}
.theme-switch-track {
  position: relative; display: block; width: 52px; height: 32px; border-radius: 999px;
  background: #3a4150; transition: background-color 0.2s ease;
}
.theme-switch-knob {
  position: absolute; top: 2px; left: 2px; width: 28px; height: 28px; border-radius: 50%;
  background: #fff; box-shadow: 0 2px 4px rgb(0 0 0 / 0.3); transition: transform 0.2s ease;
}
.theme-switch[aria-checked="true"] .theme-switch-track { background: #34c759; }
.theme-switch[aria-checked="true"] .theme-switch-knob { transform: translateX(20px); }

/* ── Hero ───────────────────────────────────────────── */
.hero { position: relative; isolation: isolate; overflow: hidden; color: #fff; padding: 96px 0 112px; }
.hero-bg { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; object-position: 30% 50%; }
.hero-overlay {
  position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(100deg, rgb(12 8 10 / 0.92) 0%, rgb(12 8 10 / 0.82) 45%, rgb(60 14 30 / 0.55) 100%),
    linear-gradient(0deg, rgb(12 8 10 / 0.6), transparent 40%);
}
.hero-content { max-width: var(--container); }
.eyebrow { margin: 0 0 16px; font-size: 14px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: #ffb59c; }
.eyebrow-muted { color: var(--accent-text); }
.hero h1, .error-title {
  font-family: var(--font-hero);
  font-size: clamp(32px, 5.2vw, 52px);
  line-height: 1.12;
  letter-spacing: -0.01em;
  margin: 0 0 24px;
  max-width: 16ch;
}
.lede { font-size: 18px; max-width: 60ch; margin: 0 0 32px; color: #f1e9ec; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 10px 20px;
  border-radius: 999px; font: inherit; font-weight: 600; font-size: 16px; text-decoration: none; cursor: pointer;
  border: 2px solid transparent; transition: transform 0.15s ease, background-color 0.15s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; }
.btn-primary:hover { filter: brightness(1.08); }
.btn-ghost { border-color: rgb(255 255 255 / 0.6); color: #fff; }
.btn-ghost:hover { background: rgb(255 255 255 / 0.12); }

/* ── Sections ───────────────────────────────────────── */
.section { padding: 64px 0; }
.section-alt { background: var(--bg-alt); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section h2 { font-size: 30px; line-height: 1.2; margin: 0 0 8px; }
.section-intro { color: var(--text-muted); margin: 0 0 32px; max-width: 60ch; }

.status-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; margin: 0; }
.status-item { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 20px; box-shadow: var(--shadow); }
.status-item dt { font-size: 14px; color: var(--text-muted); margin-bottom: 4px; }
.status-item dd { margin: 0; font-weight: 600; font-size: 17px; display: flex; align-items: center; gap: 8px; overflow-wrap: anywhere; }
.dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.dot-ok { background: var(--ok); }
.dot-bad { background: var(--bad); }

/* ── Guestbook ──────────────────────────────────────── */
.guestbook { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; align-items: start; }
.form { display: grid; gap: 16px; }
.field { display: grid; gap: 6px; }
.field label { font-weight: 600; font-size: 15px; }
.field input, .field textarea {
  width: 100%; font: inherit; color: var(--text); background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 10px 12px; min-height: 44px;
}
.field textarea { resize: vertical; }
.field input:focus, .field textarea:focus { outline: 3px solid var(--accent); outline-offset: 1px; border-color: transparent; }
.field [aria-invalid="true"] { border-color: var(--bad); }
.field-error { margin: 0; color: var(--bad); font-size: 14px; font-weight: 500; }
.field-hint { margin: 0; color: var(--text-muted); font-size: 14px; }
.form .btn { justify-self: start; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.alert { border-radius: var(--radius-sm); padding: 12px 16px; margin: 0 0 24px; border: 1px solid; }
.alert p { margin: 0; }
.alert ul { margin: 8px 0 0; padding-left: 20px; }
.alert-ok { border-color: var(--ok); color: var(--ok); background: color-mix(in srgb, var(--ok) 10%, transparent); }
.alert-error { border-color: var(--bad); color: var(--bad); background: color-mix(in srgb, var(--bad) 10%, transparent); }

.entries-title { font-size: 20px; margin: 0 0 16px; }
.entries { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.entry { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; }
.entry-message { margin: 0 0 6px; overflow-wrap: anywhere; }
.entry-meta { margin: 0; color: var(--text-muted); font-size: 14px; overflow-wrap: anywhere; }
.empty { border: 1px dashed var(--border); border-radius: var(--radius); padding: 24px; color: var(--text-muted); }
.empty p { margin: 0 0 4px; }
.empty strong { color: var(--text); }

/* ── Error pages ────────────────────────────────────── */
.error-page { padding: 96px 0; min-height: 50vh; }

/* ── Footer ─────────────────────────────────────────── */
.footer { padding: 32px 0; border-top: 1px solid var(--border); color: var(--text-muted); font-size: 14px; }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; }
.footer p { margin: 0; }
.footer a { color: var(--text-muted); }
.footer a:hover { color: var(--text); }

/* ── Responsive ─────────────────────────────────────── */
@media (max-width: 860px) {
  .guestbook { grid-template-columns: 1fr; gap: 40px; }
}
@media (max-width: 560px) {
  .container { padding: 0 16px; }
  .navbar-inner { gap: 12px; }
  .brand { font-size: 16px; gap: 8px; }
  .brand-accent { display: none; }
  .nav-links { gap: 14px; }
  .nav-links a { font-size: 14px; }
  .hero { padding: 64px 0 72px; }
  .lede { font-size: 16px; }
  .section { padding: 48px 0; }
  .section h2 { font-size: 24px; }
}
@media (max-width: 340px) {
  .nav-links { gap: 10px; }
  .nav-links a { font-size: 13px; }
}
