/* ==========================================================================
   Bageriet på Hjørnet – designsystem
   ========================================================================== */

:root {
  /* Brand – varm brun / beige */
  --brand:        #a9622e;   /* varm brun */
  --brand-deep:   #884c22;   /* dyb brun */
  --ink:          #2a1d14;   /* mørk kaffe */
  --ink-soft:     #5b4a3c;   /* dæmpet tekst */
  --surface:      #fbf4e9;   /* lys beige flade */
  --surface-2:    #f4e7d4;   /* lidt dybere beige */
  --paper:        #ffffff;
  --accent:       #c98a3a;   /* varm amber */
  --line:         #e6d5bd;

  /* Spacing-skala */
  --space-2xs: 0.25rem;
  --space-xs:  0.5rem;
  --space-sm:  0.75rem;
  --space-md:  1rem;
  --space-lg:  1.5rem;
  --space-xl:  2.5rem;
  --space-2xl: 4rem;
  --space-3xl: 6.5rem;

  /* Radier */
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 28px;
  --radius-pill: 999px;

  /* Skygger */
  --shadow-soft: 0 10px 30px -12px rgba(63, 39, 20, 0.28);
  --shadow-lift: 0 22px 48px -16px rgba(63, 39, 20, 0.34);

  /* Fluid typografi */
  --step-body: clamp(1rem, 0.96rem + 0.2vw, 1.125rem);
  --step-h6: clamp(1rem, 0.95rem + 0.3vw, 1.15rem);
  --step-h5: clamp(1.1rem, 1rem + 0.5vw, 1.35rem);
  --step-h4: clamp(1.3rem, 1.15rem + 0.8vw, 1.7rem);
  --step-h3: clamp(1.5rem, 1.3rem + 1.1vw, 2.1rem);
  --step-h2: clamp(2rem, 1.6rem + 2vw, 3rem);
  --step-h1: clamp(2.6rem, 1.9rem + 3.6vw, 4.6rem);

  --wrap: 1180px;
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "DM Sans", "Segoe UI", Helvetica, sans-serif;
}

/* Reset */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-size: var(--step-body);
  line-height: 1.65;
  color: var(--ink);
  background: var(--surface);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

[hidden] { display: none !important; }

img { display: block; max-width: 100%; height: auto; }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.08;
  color: var(--ink);
  letter-spacing: -0.01em;
}
h1 { font-size: var(--step-h1); font-weight: 700; }
h2 { font-size: var(--step-h2); }
h3 { font-size: var(--step-h4); }

p { color: var(--ink-soft); }

a { color: var(--brand-deep); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--ink); }

/* Fokus */
:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

.wrap {
  width: min(100% - 2.5rem, var(--wrap));
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -100px;
  background: var(--ink);
  color: #fff;
  padding: 0.6rem 1rem;
  border-radius: var(--radius-sm);
  z-index: 100;
  text-decoration: none;
}
.skip-link:focus { top: 1rem; }

.visually-hidden-head {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---------- Knapper ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 1rem;
  line-height: 1;
  padding: 0.95rem 1.6rem;
  border-radius: var(--radius-pill);
  border: 2px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
}
.btn-primary {
  background: var(--brand);
  color: #fff;
  box-shadow: var(--shadow-soft);
}
.btn-primary:hover { background: var(--brand-deep); color: #fff; transform: translateY(-2px); }
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: currentColor;
}
.btn-ghost:hover { background: var(--ink); color: #fff; transform: translateY(-2px); }
.btn-light {
  background: var(--surface);
  color: var(--ink);
}
.btn-light:hover { background: #fff; color: var(--ink); transform: translateY(-2px); }

.eyebrow {
  font-family: var(--font-body);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--brand-deep);
  margin-bottom: var(--space-sm);
}

.link-arrow {
  font-weight: 700;
  text-decoration: none;
  color: var(--brand-deep);
}
.link-arrow:hover { color: var(--ink); }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(251, 244, 233, 0.86);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  gap: var(--space-md);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--ink);
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 38px; height: 38px;
  background: var(--brand);
  color: #fff;
  border-radius: 50%;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem;
}
.brand-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.2rem;
  letter-spacing: -0.01em;
}

.primary-nav {
  display: flex;
  align-items: center;
  gap: clamp(0.5rem, 1.6vw, 1.6rem);
}
.primary-nav a {
  text-decoration: none;
  color: var(--ink-soft);
  font-weight: 500;
  padding: 0.4rem 0.2rem;
  position: relative;
}
.primary-nav a:hover { color: var(--ink); }
.primary-nav a[aria-current="page"] { color: var(--ink); font-weight: 700; }
.primary-nav a[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 0.2rem; right: 0.2rem; bottom: -2px;
  height: 2px;
  background: var(--brand);
  border-radius: 2px;
}
.nav-cta {
  background: var(--brand);
  color: #fff !important;
  padding: 0.55rem 1.1rem !important;
  border-radius: var(--radius-pill);
}
.nav-cta:hover { background: var(--brand-deep); }
.nav-cta[aria-current="page"]::after { display: none; }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: transparent;
  border: 0;
  padding: 0.5rem;
  cursor: pointer;
}
.nav-toggle-bar {
  width: 26px; height: 2.5px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.2s ease;
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

@media (max-width: 720px) {
  .nav-toggle { display: flex; }
  .primary-nav {
    position: fixed;
    inset: 72px 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    padding: var(--space-sm) var(--space-lg) var(--space-lg);
    box-shadow: var(--shadow-soft);
    transform: translateY(-120%);
    transition: transform 0.3s ease;
    max-height: calc(100vh - 72px);
    overflow-y: auto;
  }
  .primary-nav.open { transform: translateY(0); }
  .primary-nav a {
    padding: 0.9rem 0.2rem;
    border-bottom: 1px solid var(--line);
    font-size: 1.1rem;
  }
  .primary-nav a[aria-current="page"]::after { display: none; }
  .nav-cta {
    margin-top: var(--space-md);
    text-align: center;
    border: 0;
  }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: clamp(520px, 78vh, 760px);
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  isolation: isolate;
}
.hero-media {
  position: absolute;
  inset: 0;
  background-image: url("../img/photo-1.jpg");
  background-size: cover;
  background-position: center;
  z-index: -2;
  transform: scale(1.02);
}
.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(to top, rgba(32, 20, 11, 0.9) 0%, rgba(32, 20, 11, 0.45) 45%, rgba(32, 20, 11, 0.2) 100%);
}
.hero-content {
  padding-block: var(--space-2xl) var(--space-2xl);
  color: #fff;
  max-width: 760px;
}
.hero .eyebrow { color: #f3d9b8; }
.hero h1 { color: #fff; max-width: 15ch; }
.hero-sub {
  color: #f6ead8;
  font-size: clamp(1.05rem, 1rem + 0.5vw, 1.35rem);
  margin-top: var(--space-md);
  max-width: 54ch;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
  margin-top: var(--space-xl);
}
.hero-actions .btn-ghost { color: #fff; }
.hero-actions .btn-ghost:hover { background: #fff; color: var(--ink); }

/* ---------- Strip ---------- */
.strip {
  background: var(--ink);
  color: #fff;
}
.strip-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-lg);
  padding-block: var(--space-xl);
}
.strip-item {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  padding-left: var(--space-md);
  border-left: 2px solid var(--accent);
}
.strip-key {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 600;
  color: #fff;
}
.strip-val { color: #e2cdb3; font-size: 0.95rem; }

@media (max-width: 860px) {
  .strip-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 460px) {
  .strip-grid { grid-template-columns: 1fr; }
}

/* ---------- Sektioner ---------- */
.section { padding-block: var(--space-3xl); }
.section-head {
  max-width: 62ch;
  margin-inline: auto;
  text-align: center;
  margin-bottom: var(--space-2xl);
}
.section-head.align-left {
  margin-inline: 0;
  text-align: left;
}
.section-lead { font-size: 1.1rem; margin-top: var(--space-sm); }
.section-foot { text-align: center; margin-top: var(--space-xl); }

/* ---------- Kort ---------- */
.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
}
.card {
  background: var(--paper);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  border: 1px solid var(--line);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lift); }
.card img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.card-body { padding: var(--space-lg); }
.card-body h3 { margin-bottom: var(--space-xs); }

@media (max-width: 900px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .cards { grid-template-columns: 1fr; }
}

/* ---------- Feature / vekslende ---------- */
.feature { padding-block: var(--space-3xl); }
.feature-alt { background: var(--surface-2); }
.feature-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(1.5rem, 5vw, 4.5rem);
  align-items: center;
}
.feature-alt .feature-media { order: 2; }
.feature-media img {
  width: 100%;
  aspect-ratio: 9 / 7;
  object-fit: cover;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lift);
}
.feature-text h2 { margin-bottom: var(--space-md); }
.feature-text p { margin-bottom: var(--space-md); }
.feature-text .btn { margin-top: var(--space-sm); }

@media (max-width: 820px) {
  .feature-grid { grid-template-columns: 1fr; }
  .feature-alt .feature-media { order: 0; }
}

/* ---------- CTA band ---------- */
.cta-band {
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-deep) 100%);
  color: #fff;
}
.cta-inner {
  text-align: center;
  padding-block: var(--space-3xl);
  max-width: 60ch;
  margin-inline: auto;
}
.cta-inner h2 { color: #fff; }
.cta-inner p { color: #f6e4cd; margin-top: var(--space-md); margin-bottom: var(--space-xl); }

/* ---------- Page hero ---------- */
.page-hero {
  padding-block: var(--space-3xl) var(--space-2xl);
  background: var(--surface-2);
  border-bottom: 1px solid var(--line);
}
.page-hero h1 { max-width: 18ch; }
.page-hero-lead {
  font-size: 1.15rem;
  max-width: 58ch;
  margin-top: var(--space-md);
}

/* ---------- Priser ---------- */
.price-layout {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(1.5rem, 5vw, 4rem);
  align-items: start;
}
.menu-list { list-style: none; padding: 0; }
.menu-row {
  display: flex;
  align-items: baseline;
  gap: var(--space-sm);
  padding: var(--space-md) 0;
  border-bottom: 1px solid var(--line);
}
.menu-name {
  font-family: var(--font-display);
  font-size: var(--step-h5);
  color: var(--ink);
}
.menu-dots {
  flex: 1;
  border-bottom: 2px dotted var(--line);
  transform: translateY(-4px);
}
.menu-price {
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--brand-deep);
  white-space: nowrap;
}
.price-note { margin: var(--space-lg) 0; }
.price-figure img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lift);
}
.price-figure figcaption {
  margin-top: var(--space-sm);
  font-size: 0.9rem;
  color: var(--ink-soft);
  font-style: italic;
}

@media (max-width: 820px) {
  .price-layout { grid-template-columns: 1fr; }
  .price-figure { order: -1; }
}

/* ---------- Galleri ---------- */
.gallery {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 220px;
  gap: var(--space-md);
}
.gallery-item {
  overflow: hidden;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-soft);
}
.gallery-item img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.gallery-item:hover img { transform: scale(1.06); }
.gallery-wide { grid-column: span 2; }
.gallery-tall { grid-row: span 2; }

@media (max-width: 900px) {
  .gallery { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 200px; }
  .gallery-tall { grid-row: span 1; }
}
@media (max-width: 520px) {
  .gallery { grid-template-columns: 1fr; grid-auto-rows: 240px; }
  .gallery-wide { grid-column: span 1; }
}

/* ---------- Værdier (om os) ---------- */
.values { padding-block: var(--space-3xl); background: var(--surface-2); }
.value-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-lg);
}
.value-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  box-shadow: var(--shadow-soft);
}
.value-card h3 { font-size: var(--step-h5); margin-bottom: var(--space-xs); }
.value-card p { font-size: 0.98rem; }

@media (max-width: 900px) { .value-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .value-grid { grid-template-columns: 1fr; } }

/* ---------- Kontakt ---------- */
.contact-layout {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: clamp(1.5rem, 5vw, 4rem);
  align-items: start;
}
.contact-info h2 { margin-bottom: var(--space-lg); }
.info-block { margin-bottom: var(--space-lg); }
.info-block h3 {
  font-family: var(--font-body);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--brand-deep);
  margin-bottom: var(--space-2xs);
}
.info-block address { font-style: normal; color: var(--ink); }
.hours-list { list-style: none; padding: 0; }
.hours-list li {
  display: flex;
  justify-content: space-between;
  gap: var(--space-md);
  padding: 0.35rem 0;
  border-bottom: 1px solid var(--line);
  max-width: 340px;
  color: var(--ink);
}
.contact-figure { margin-top: var(--space-lg); }
.contact-figure img {
  width: 100%;
  aspect-ratio: 10 / 7;
  object-fit: cover;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-soft);
}

.thanks {
  background: #e9f3e4;
  border: 1px solid #b9d6a9;
  color: #2f5020;
  padding: var(--space-md) var(--space-lg);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-lg);
  font-weight: 500;
}

.contact-form-wrap {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: clamp(1.5rem, 4vw, 2.5rem);
  box-shadow: var(--shadow-soft);
}
.field { margin-bottom: var(--space-lg); display: flex; flex-direction: column; }
.field label {
  font-weight: 700;
  margin-bottom: var(--space-2xs);
  color: var(--ink);
}
.field input,
.field textarea {
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--ink);
  background: var(--surface);
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 0.8rem 0.9rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.field input:focus,
.field textarea:focus {
  border-color: var(--brand);
  outline: none;
  box-shadow: 0 0 0 3px rgba(169, 98, 46, 0.18);
}
.field textarea { resize: vertical; }
.field-hint { font-size: 0.85rem; color: var(--ink-soft); margin-top: var(--space-2xs); }
.field-error {
  font-size: 0.85rem;
  color: #a62b1f;
  margin-top: var(--space-2xs);
  display: none;
}
.field.invalid input,
.field.invalid textarea { border-color: #a62b1f; }
.field.invalid .field-error { display: block; }

@media (max-width: 820px) {
  .contact-layout { grid-template-columns: 1fr; }
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--ink);
  color: #e9d9c4;
  padding-top: var(--space-3xl);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: var(--space-xl);
  padding-bottom: var(--space-2xl);
}
.footer-col h3 {
  color: #fff;
  font-family: var(--font-body);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  margin-bottom: var(--space-md);
}
.footer-brand .brand-name {
  display: block;
  font-size: 1.4rem;
  color: #fff;
  margin-bottom: var(--space-sm);
}
.footer-col p, .footer-col address { color: #cdb99f; font-style: normal; }
.footer-col nav { display: flex; flex-direction: column; gap: 0.4rem; }
.footer-col a { color: #e9d9c4; text-decoration: none; }
.footer-col a:hover { color: #fff; text-decoration: underline; }
.footer-hours { margin-top: var(--space-sm); }
.footer-note { margin-top: var(--space-md); font-size: 0.85rem; color: #a78e74; }
.footer-base {
  border-top: 1px solid rgba(255,255,255,0.12);
  padding-block: var(--space-lg);
}
.footer-base p { color: #a78e74; font-size: 0.9rem; }

@media (max-width: 860px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: var(--space-xl); }
}
@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; }
}

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