/* grythyttan.online — tonen följer filmen: mörk varm botten, guld och
   cremevitt, Crimson Text och DM Sans för överrubriker (ORDER W1). */

@font-face { font-family: 'Crimson Text'; font-style: normal; font-weight: 400; font-display: swap;
  src: url('/assets/fonts/crimson-text-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Crimson Text'; font-style: italic; font-weight: 400; font-display: swap;
  src: url('/assets/fonts/crimson-text-latin-400-italic.woff2') format('woff2'); }
@font-face { font-family: 'Crimson Text'; font-style: normal; font-weight: 600; font-display: swap;
  src: url('/assets/fonts/crimson-text-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'DM Sans'; font-style: normal; font-weight: 400; font-display: swap;
  src: url('/assets/fonts/dm-sans-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'DM Sans'; font-style: normal; font-weight: 600; font-display: swap;
  src: url('/assets/fonts/dm-sans-latin-600-normal.woff2') format('woff2'); }

:root {
  --bg: #15130f;
  --surface: #1f1b16;
  --line: #3a3228;
  --cream: #efe6d2;
  --muted: #b9ab90;
  --gold: #d4a64a;
  --gold-strong: #e6bc62;
  --error: #f0a08a;
  --serif: 'Crimson Text', Georgia, 'Times New Roman', serif;
  --sans: 'DM Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --measure: 40rem;
  --gutter: clamp(1rem, 4vw, 2.5rem);
  color-scheme: dark;
}

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

html { -webkit-text-size-adjust: 100%; }
/* Språkbytet till engelska: body döljs tills site.js bytt texten; visas
   ändå efter 1,5 s om skriptet aldrig körs. */
html.i18n-pending body { visibility: hidden; animation: i18n-reveal 0s linear 1.5s forwards; }
@keyframes i18n-reveal { to { visibility: visible; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--cream);
  font-family: var(--serif);
  font-size: 1.1875rem;
  line-height: 1.6;
  background-image: radial-gradient(ellipse 120% 60% at 50% 0%, #2a2219 0%, var(--bg) 70%);
  background-repeat: no-repeat;
}

a { color: var(--gold-strong); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { color: var(--cream); }
:focus-visible { outline: 2px solid var(--gold-strong); outline-offset: 3px; border-radius: 2px; }

.skip { position: absolute; left: -9999px; top: 0; background: var(--gold); color: var(--bg); padding: .5rem 1rem; z-index: 10; }
.skip:focus { left: 1rem; top: 1rem; }

/* --- sidhuvud ----------------------------------------------------------- */
.site-header {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  max-width: 72rem; margin: 0 auto; padding: 1.25rem var(--gutter);
}
.brand {
  font-family: var(--sans); font-weight: 600; font-size: .8125rem; letter-spacing: .28em;
  text-transform: uppercase; color: var(--gold); text-decoration: none;
}
.lang { display: flex; gap: .25rem; }
.lang button {
  font-family: var(--sans); font-size: .8125rem; font-weight: 600; letter-spacing: .12em;
  background: transparent; color: var(--muted); border: 1px solid var(--line);
  border-radius: 999px; min-width: 2.75rem; min-height: 2.75rem; padding: 0 .75rem; cursor: pointer;
}
.lang button[aria-pressed="true"] { color: var(--bg); background: var(--gold); border-color: var(--gold); }
.lang button:hover { border-color: var(--gold); }

/* --- avsnitt ------------------------------------------------------------ */
main { max-width: 72rem; margin: 0 auto; padding: 0 var(--gutter); }

.overline {
  font-family: var(--sans); font-weight: 600; font-size: .75rem; letter-spacing: .3em;
  text-transform: uppercase; color: var(--gold); margin: 0 0 .75rem;
  display: flex; align-items: center; gap: .75rem;
}
.overline::before { content: ''; width: 2rem; height: 1px; background: var(--gold); flex: none; }

h1, h2 { font-weight: 400; line-height: 1.15; margin: 0 0 1.25rem; letter-spacing: -.005em; }
h1 { font-size: clamp(2.125rem, 6vw, 3.75rem); }
h2 { font-size: clamp(1.75rem, 4.2vw, 2.5rem); }

.hero { padding: clamp(1.5rem, 6vw, 4rem) 0 clamp(2.5rem, 6vw, 4rem); }
.hero h1 { max-width: 22ch; }

.video { margin: 1.75rem 0 0; }
.video video {
  display: block; width: 100%; height: auto; aspect-ratio: 16 / 9;
  background: #000; border: 1px solid var(--line); border-radius: 4px;
}
.video figcaption {
  font-family: var(--sans); font-size: .875rem; color: var(--muted); margin-top: .75rem;
  display: flex; flex-wrap: wrap; gap: .25rem 1rem;
}

.summary { margin-top: 1.25rem; max-width: var(--measure); }
.summary summary {
  font-family: var(--sans); font-size: .9375rem; color: var(--gold-strong); cursor: pointer;
  min-height: 2.75rem; display: flex; align-items: center;
}
.summary p { color: var(--cream); }

.block {
  max-width: var(--measure); padding: clamp(2.5rem, 7vw, 4.5rem) 0;
  border-top: 1px solid var(--line);
}
.block p { margin: 0 0 1rem; }

/* --- formulär ----------------------------------------------------------- */
.notify { margin-top: 1.5rem; display: grid; gap: 1.25rem; }
.field label {
  display: block; font-family: var(--sans); font-size: .875rem; font-weight: 600;
  letter-spacing: .04em; color: var(--muted); margin-bottom: .4rem;
}
.field input, .field select {
  width: 100%; font: inherit; font-size: 1.0625rem; color: var(--cream);
  background: var(--surface); border: 1px solid var(--line); border-radius: 4px;
  padding: .7rem .85rem; min-height: 3rem;
}
.field select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--gold) 50%), linear-gradient(135deg, var(--gold) 50%, transparent 50%);
  background-position: calc(100% - 1.15rem) 55%, calc(100% - .8rem) 55%; background-size: .35rem .35rem; background-repeat: no-repeat; padding-right: 2.25rem; }
.field input:focus, .field select:focus { border-color: var(--gold); }
.notify [aria-invalid="true"] { border-color: var(--error); }

.check { display: grid; grid-template-columns: auto 1fr; gap: .75rem; align-items: start; }
.check input { width: 1.375rem; height: 1.375rem; margin: .25rem 0 0; accent-color: var(--gold); }
.check label { font-size: 1rem; line-height: 1.5; }

.interests { border: 0; margin: 0; padding: 0; display: grid; gap: .85rem; min-width: 0; }
.interests legend {
  font-family: var(--sans); font-size: .875rem; font-weight: 600; letter-spacing: .04em;
  color: var(--muted); margin-bottom: .85rem; padding: 0;
}
.interests[aria-invalid="true"] legend { color: var(--error); }
.check .note { display: block; font-size: .9375rem; color: var(--muted); margin-top: .25rem; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }

.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.notify button, .button-link {
  justify-self: start; font-family: var(--sans); font-weight: 600; font-size: .9375rem;
  letter-spacing: .08em; text-transform: uppercase; text-decoration: none;
  color: var(--bg); background: var(--gold); border: 0; border-radius: 999px;
  padding: .85rem 1.75rem; min-height: 3rem; cursor: pointer; display: inline-flex; align-items: center;
}
.notify button:hover, .button-link:hover { background: var(--gold-strong); color: var(--bg); }
.notify button[disabled] { opacity: .6; cursor: progress; }

.status { font-family: var(--sans); font-size: 1rem; margin: 0; min-height: 1.5em; }
.status.ok { color: var(--gold-strong); }
.status.err { color: var(--error); }

/* --- sidfot ------------------------------------------------------------- */
.site-footer {
  max-width: 72rem; margin: 0 auto; padding: 2.5rem var(--gutter) 3rem;
  border-top: 1px solid var(--line); font-family: var(--sans); font-size: .875rem; color: var(--muted);
}
.site-footer p { margin: 0 0 .5rem; }
.footer-links { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; }

/* --- textsidor (integritet, tack) --------------------------------------- */
.prose { max-width: var(--measure); padding: clamp(1.5rem, 6vw, 4rem) 0 4rem; }
.prose h2 { font-size: 1.5rem; margin-top: 2rem; }
.prose ul { padding-left: 1.25rem; }

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; }
}
.draft {
  font-family: var(--sans); font-size: .875rem; color: var(--bg); background: var(--gold);
  display: inline-block; padding: .35rem .75rem; border-radius: 4px;
}
