/* Moio gavekort – felles stil. Ingen eksterne fonter eller ressurser. */

:root {
  color-scheme: light;
  --bg: #faf8f5;
  --surface: #ffffff;
  --text: #1f1d1a;
  --muted: #6a655e;
  --line: #e4dfd7;
  --accent: #2b2a28;
  --focus: #1d5fd1;
  --error: #b3261e;
  --vipps: #ff5b24;
  --radius: 10px;
  --serif: Georgia, "Times New Roman", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: inherit; text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }

:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }

.wrap { width: 100%; max-width: 44rem; margin: 0 auto; padding: 0 1rem; }

/* Topp */
.site-header { border-bottom: 1px solid var(--line); background: var(--surface); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; padding-top: 1rem; padding-bottom: 1rem; }
.brand { display: block; line-height: 0; }
.brand img { display: block; height: 2.6rem; width: auto; }
.site-nav { display: flex; gap: 1.25rem; flex-wrap: wrap; font-size: 0.95rem; }
.site-nav a { text-decoration: none; color: var(--muted); }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--text); text-decoration: underline; }

/* Innhold */
main { flex: 1; padding: 2rem 0 3rem; }
h1 { font-family: var(--serif); font-weight: 400; font-size: 2rem; line-height: 1.2; margin: 0 0 0.75rem; }
h2 { font-family: var(--serif); font-weight: 400; font-size: 1.35rem; line-height: 1.3; margin: 2.25rem 0 0.5rem; }
h3 { font-size: 1rem; margin: 1.5rem 0 0.25rem; }
p { margin: 0 0 1rem; }
.lead { font-size: 1.1rem; color: var(--muted); }
.muted { color: var(--muted); }
.small { font-size: 0.9rem; }

/* Produkter */
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
legend { padding: 0; font-family: var(--serif); font-size: 1.35rem; margin-bottom: 0.75rem; }

.products { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.75rem; }
.product { position: relative; display: block; }
.product input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.product .card {
  display: flex; flex-direction: column; gap: 0.15rem;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1rem 1.1rem;
}
.product .name { color: var(--muted); font-size: 0.9rem; }
.product .price { font-family: var(--serif); font-size: 1.5rem; }
.product input:checked + .card { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.product input:focus-visible + .card { outline: 3px solid var(--focus); outline-offset: 2px; }
.product.wide { grid-column: 1 / -1; }

.custom-amount { margin-top: 0.75rem; }

/* Skjema */
.field { margin-top: 1rem; }
label.label { display: block; font-weight: 600; margin-bottom: 0.3rem; }
.hint { display: block; color: var(--muted); font-size: 0.9rem; font-weight: 400; }
input[type="text"], input[type="email"], input[type="number"] {
  width: 100%; font: inherit; color: inherit; background: var(--surface);
  border: 1px solid #b9b3a9; border-radius: 8px; padding: 0.7rem 0.8rem;
}
.amount-input { position: relative; max-width: 14rem; }
.amount-input input { padding-right: 2.6rem; }
.amount-input span { position: absolute; right: 0.9rem; top: 50%; transform: translateY(-50%); color: var(--muted); }

.check { display: flex; gap: 0.6rem; align-items: flex-start; margin-top: 1.25rem; }
.check input { width: 1.2rem; height: 1.2rem; margin-top: 0.2rem; flex: none; accent-color: var(--accent); }

.error { color: var(--error); font-size: 0.9rem; margin: 0.3rem 0 0; }
[hidden] { display: none !important; }

.summary {
  margin-top: 1.5rem; padding: 1rem 1.1rem; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius);
  display: flex; justify-content: space-between; align-items: baseline; gap: 1rem;
}
.summary .total { font-family: var(--serif); font-size: 1.5rem; }

.pay {
  margin-top: 1rem; width: 100%; font: inherit; font-weight: 600; font-size: 1.05rem;
  color: #fff; background: var(--vipps); border: 0; border-radius: 999px;
  padding: 0.9rem 1.25rem; cursor: pointer;
}
.pay:hover { filter: brightness(0.95); }
.pay-note { margin-top: 0.75rem; }

.notice {
  margin-top: 1rem; padding: 0.9rem 1.1rem; border-radius: var(--radius);
  background: #fff7e6; border: 1px solid #ecd9a8;
}

.steps { padding-left: 1.2rem; margin: 0 0 1rem; }
.steps li { margin-bottom: 0.4rem; }

/* Juridiske sider */
.legal h2 { margin-top: 2rem; }
.legal ul, .legal ol { padding-left: 1.3rem; margin: 0 0 1rem; }
.legal li { margin-bottom: 0.35rem; }
.legal table { width: 100%; border-collapse: collapse; margin: 0 0 1rem; font-size: 0.95rem; }
.legal th, .legal td { text-align: left; vertical-align: top; padding: 0.5rem 0.6rem; border-bottom: 1px solid var(--line); }
.legal th { font-weight: 600; }
.table-scroll { overflow-x: auto; }
.formbox { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.1rem; }
.formbox p { margin-bottom: 0.6rem; }

/* Markering av punkter som må avklares før publisering. `npm run deploy` stopper så lenge slike finnes. */
mark.avklar { background: #ffe08a; color: #3b2f00; padding: 0.05em 0.3em; border-radius: 3px; font-size: 0.9em; }

/* Bunn */
.site-footer { border-top: 1px solid var(--line); background: var(--surface); font-size: 0.92rem; color: var(--muted); }
.site-footer .wrap { padding-top: 1.5rem; padding-bottom: 2rem; display: grid; gap: 1rem; grid-template-columns: 1fr; }
.site-footer strong { color: var(--text); }
.site-footer address { font-style: normal; }
.site-footer nav { display: flex; gap: 1.25rem; flex-wrap: wrap; }

@media (min-width: 40rem) {
  h1 { font-size: 2.4rem; }
  .products { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .site-footer .wrap { grid-template-columns: 1fr 1fr; }
  .site-footer nav { justify-content: flex-end; align-items: flex-start; }
}

@media print {
  .site-header, .site-footer nav, .pay { display: none; }
  body { background: #fff; }
}
