/* Café Marehalm – demoside lavet af Bang Web
   Farver, skrift og form følger brandmanualen v1.0 */

:root {
  --espresso: #3B2A20;
  --klitgron: #4E6B4A;
  --havtorn: #A84F17;
  --havtorn-hover: #8F4212;
  --lys-havtorn: #E8893A;
  --sand: #F6EFE3;
  --hvid: #FFFFFF;
  --daempet: #6B5D52;
  --linje: #E6DCCB;
  --sand-mork: #EDE3D2;

  --font-head: "Fraunces", Georgia, serif;
  --font-body: "Work Sans", system-ui, sans-serif;

  --r-sm: 10px;
  --r-lg: 16px;
  --gutter: 16px;
  --max: 1160px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--sand);
  color: var(--espresso);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 27px;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--klitgron); text-underline-offset: 3px; }
a:hover { color: var(--espresso); }
:focus-visible { outline: 3px solid var(--klitgron); outline-offset: 3px; border-radius: 4px; }

h1, h2, h3, .display {
  font-family: var(--font-head);
  font-weight: 600;
  font-optical-sizing: auto;
  margin: 0 0 16px;
  letter-spacing: -0.01em;
}
.display { font-size: 52px; line-height: 58px; }
h1 { font-size: 38px; line-height: 44px; }
h2 { font-size: 28px; line-height: 34px; }
h3 { font-size: 22px; line-height: 28px; }
p { margin: 0 0 16px; }
p:last-child { margin-bottom: 0; }
.lead { font-size: 20px; line-height: 30px; }
.small { font-size: 15px; line-height: 22px; }
.muted { color: var(--daempet); }

@media (max-width: 767px) {
  .display { font-size: clamp(36px, 10vw, 44px); line-height: 1.12; }
  h1 { font-size: 32px; line-height: 38px; }
  h2 { font-size: 26px; line-height: 32px; }
  .lead { font-size: 19px; line-height: 29px; }
}

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
@media (min-width: 768px) { :root { --gutter: 32px; } }

.skip-link {
  position: absolute; left: 16px; top: -100px; z-index: 100;
  background: var(--espresso); color: var(--sand);
  padding: 12px 20px; border-radius: 999px; text-decoration: none;
}
.skip-link:focus { top: 16px; }

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

/* ---------- Strået: brandets lille signatur ---------- */
.straa {
  display: inline-block;
  width: 20px; height: 24px;
  background: currentColor;
  -webkit-mask: url("../assets/straa.svg") center / contain no-repeat;
          mask: url("../assets/straa.svg") center / contain no-repeat;
  color: var(--klitgron);
  flex: none;
}
.kicker {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 15px; line-height: 22px; font-weight: 500;
  color: var(--klitgron);
  margin-bottom: 16px;
}
.kicker .straa { width: 16px; height: 20px; }

/* ---------- Demo-bånd ---------- */
.demo-bar {
  background: var(--espresso); color: var(--sand);
  font-size: 14px; line-height: 20px; text-align: center;
  padding: 8px var(--gutter);
}
.demo-bar a { color: var(--sand); font-weight: 500; }
.demo-bar a:hover { color: var(--hvid); }

/* ---------- Knapper ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 52px; padding: 14px 28px;
  border-radius: 999px; border: 2px solid transparent;
  font-family: var(--font-body); font-size: 17px; font-weight: 500; line-height: 1;
  text-decoration: none; cursor: pointer;
  transition: background-color .15s, color .15s, border-color .15s;
}
.btn--havtorn { background: var(--havtorn); color: var(--hvid); }
.btn--havtorn:hover { background: var(--havtorn-hover); color: var(--hvid); }
.btn--outline { border-color: var(--espresso); color: var(--espresso); background: transparent; }
.btn--outline:hover { background: var(--espresso); color: var(--sand); }
.btn--sand { background: var(--sand); color: var(--espresso); }
.btn--sand:hover { background: var(--hvid); color: var(--espresso); }
.btn--small { min-height: 44px; padding: 10px 22px; font-size: 16px; }
.actions { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; margin-top: 32px; }
@media (max-width: 767px) {
  .actions { flex-direction: column; align-items: stretch; }
  .actions .btn { width: 100%; }
}

.link-arrow { font-weight: 500; color: var(--espresso); text-decoration: none; display: inline-flex; gap: 8px; align-items: center; }
.link-arrow::after { content: "→"; transition: transform .15s; }
.link-arrow:hover { color: var(--klitgron); }
.link-arrow:hover::after { transform: translateX(3px); }

/* ---------- Header ---------- */
.site-header {
  background: var(--sand);
  border-bottom: 1px solid var(--linje);
  position: sticky; top: 0; z-index: 50;
}
.site-header__inner { display: flex; align-items: center; gap: 32px; min-height: 80px; }
.site-header__logo { display: block; flex: none; }
.site-header__logo img { width: 168px; height: auto; }
.nav { margin-left: auto; }
.nav__list { list-style: none; margin: 0; padding: 0; display: flex; gap: 8px; }
.nav__link {
  display: block; padding: 10px 14px; border-radius: 999px;
  color: var(--espresso); text-decoration: none; font-weight: 500;
}
.nav__link:hover { background: var(--sand-mork); color: var(--espresso); }
.nav__link[aria-current="page"] { background: var(--hvid); box-shadow: inset 0 0 0 1px var(--linje); }

.menu-toggle {
  display: none; margin-left: auto;
  align-items: center; gap: 10px;
  background: none; border: 1px solid var(--linje); border-radius: 999px;
  padding: 10px 18px; min-height: 44px;
  font: 500 16px var(--font-body); color: var(--espresso); cursor: pointer;
}
.menu-toggle__bars { width: 18px; height: 12px; position: relative; display: inline-block; }
.menu-toggle__bars::before, .menu-toggle__bars::after, .menu-toggle__bars span {
  content: ""; position: absolute; left: 0; right: 0; height: 2px; background: currentColor; border-radius: 2px;
  transition: transform .2s, opacity .2s;
}
.menu-toggle__bars::before { top: 0; }
.menu-toggle__bars span { top: 5px; }
.menu-toggle__bars::after { top: 10px; }
.menu-toggle[aria-expanded="true"] .menu-toggle__bars::before { transform: translateY(5px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] .menu-toggle__bars span { opacity: 0; }
.menu-toggle[aria-expanded="true"] .menu-toggle__bars::after { transform: translateY(-5px) rotate(-45deg); }

.mobile-menu { display: none; border-top: 1px solid var(--linje); padding: 16px 0 32px; }
.mobile-menu .nav__list { flex-direction: column; gap: 4px; }
.mobile-menu .nav__link { padding: 14px 16px; font-size: 19px; }
.mobile-menu .btn { width: 100%; margin-top: 24px; }
.site-header.is-open .mobile-menu { display: block; }

@media (max-width: 899px) {
  .nav, .site-header__cta { display: none; }
  .menu-toggle { display: inline-flex; }
  .site-header__inner { min-height: 68px; }
  .site-header__logo img { width: 148px; }
}

/* ---------- Sektioner ---------- */
.section { padding: 64px 0; }
.section--white { background: var(--hvid); }
.section--green { background: var(--klitgron); color: var(--sand); }
.section--green h2, .section--green h3 { color: var(--sand); }
.section--green .kicker { color: var(--sand); }
.section--green .kicker .straa { color: var(--sand); }
@media (min-width: 768px) { .section { padding: 96px 0; } }

.section__head { max-width: 640px; margin-bottom: 48px; }
.section__head--row { max-width: none; display: flex; justify-content: space-between; align-items: end; gap: 24px; flex-wrap: wrap; }
.section__head--row > div { max-width: 640px; }

.split { display: grid; gap: 48px; align-items: center; }
@media (min-width: 900px) {
  .split { grid-template-columns: 1fr 1fr; gap: 64px; }
  .split--wide-media { grid-template-columns: 5fr 6fr; }
  .split--reverse > :first-child { order: 2; }
}
.split--top { align-items: start; }

.grid { display: grid; gap: 24px; }
@media (min-width: 640px) { .grid--2 { grid-template-columns: repeat(2, 1fr); } .grid--4 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .grid--3 { grid-template-columns: repeat(3, 1fr); } .grid--4 { grid-template-columns: repeat(4, 1fr); } }

.photo { border-radius: var(--r-lg); overflow: hidden; background: var(--sand-mork); }
.photo img { width: 100%; height: 100%; object-fit: cover; }
.photo--tall { aspect-ratio: 4 / 5; }
.photo--wide { aspect-ratio: 3 / 2; }
.photo--square { aspect-ratio: 1; }

.card {
  background: var(--hvid);
  border: 1px solid var(--linje);
  border-radius: var(--r-lg);
  padding: 32px;
}
.section--white .card { background: var(--sand); }
@media (max-width: 639px) { .card { padding: 24px; } }

/* ---------- Forside: hero ---------- */
.hero { padding: 48px 0 64px; }
@media (min-width: 900px) { .hero { padding: 72px 0 96px; } }
.hero .lead { color: var(--daempet); max-width: 520px; }
.hero__media { position: relative; }
.hero__media .photo { aspect-ratio: 4 / 5; }
.hero__note {
  position: absolute; left: -24px; bottom: 32px;
  background: var(--hvid); border: 1px solid var(--linje); border-radius: var(--r-lg);
  padding: 16px 20px; max-width: 260px;
  display: flex; gap: 12px; align-items: flex-start;
  font-size: 15px; line-height: 22px;
}
.hero__note strong { display: block; font-family: var(--font-head); font-weight: 600; font-size: 18px; line-height: 24px; }
@media (max-width: 899px) {
  .hero__media .photo { aspect-ratio: 4 / 3; }
  .hero__note { position: static; max-width: none; margin-top: 16px; }
}

.open-status {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--hvid); border: 1px solid var(--linje); border-radius: 999px;
  padding: 6px 14px 6px 12px; margin-bottom: 24px;
  font-size: 15px; line-height: 22px; font-weight: 500;
}
.open-status__dot { width: 10px; height: 10px; border-radius: 50%; background: var(--daempet); }
.open-status.is-open .open-status__dot { background: var(--klitgron); box-shadow: 0 0 0 4px rgba(78, 107, 74, .18); }

/* ---------- Værdier ---------- */
.values { border-top: 1px solid var(--linje); border-bottom: 1px solid var(--linje); }
.values__grid { display: grid; gap: 0; }
.value { padding: 32px 0; border-bottom: 1px solid var(--linje); }
.value:last-child { border-bottom: 0; }
.value h3 { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.value p { color: var(--daempet); }
@media (min-width: 900px) {
  .values__grid { grid-template-columns: repeat(4, 1fr); }
  .value { padding: 40px 32px; border-bottom: 0; border-left: 1px solid var(--linje); }
  .value:first-child { border-left: 0; padding-left: 0; }
}

/* ---------- En dag i caféen (tidslinje) ---------- */
.day { list-style: none; margin: 0; padding: 0; position: relative; }
.day::before {
  content: ""; position: absolute; left: 39px; top: 8px; bottom: 8px;
  width: 1px; background: var(--linje);
}
.day li { display: grid; grid-template-columns: 80px 1fr; gap: 24px; padding: 14px 0; position: relative; }
.day time {
  font-family: var(--font-head); font-weight: 600; font-size: 18px; line-height: 27px;
  background: var(--hvid); text-align: center; border-radius: 999px;
  border: 1px solid var(--linje); position: relative; z-index: 1; height: 30px; line-height: 28px;
  font-variant-numeric: tabular-nums;
}
.section--white .day time { background: var(--sand); }
.day strong { display: block; font-weight: 500; }
.day span { color: var(--daempet); }

/* ---------- Menu-teaser ---------- */
.dish { display: flex; flex-direction: column; background: var(--hvid); border: 1px solid var(--linje); border-radius: var(--r-lg); overflow: hidden; text-decoration: none; color: inherit; }
.dish .photo { border-radius: 0; aspect-ratio: 3 / 2; }
.dish__body { padding: 24px 28px 28px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.dish__body h3 { margin: 0; }
.dish__body p { color: var(--daempet); }
.dish__when { font-size: 15px; line-height: 22px; color: var(--klitgron); font-weight: 500; }
a.dish:hover { border-color: var(--klitgron); color: inherit; }
a.dish:hover img { transform: scale(1.03); }
.dish img { transition: transform .4s ease; }

/* ---------- Leverandører ---------- */
.suppliers { display: grid; gap: 24px; }
@media (min-width: 900px) { .suppliers { grid-template-columns: repeat(3, 1fr); } }
.supplier { display: flex; flex-direction: column; gap: 16px; }
.supplier .photo { aspect-ratio: 4 / 3; }
.supplier__place { font-size: 15px; line-height: 22px; color: var(--klitgron); font-weight: 500; display: flex; align-items: center; gap: 8px; }
.supplier__place::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.supplier h3 { margin-bottom: 4px; }
.supplier p { color: var(--daempet); }

/* ---------- Velkommen-bånd ---------- */
.welcome { text-align: center; }
.welcome .straa { width: 40px; height: 48px; color: var(--sand); margin-bottom: 24px; }
.welcome h2 { font-size: clamp(30px, 5vw, 44px); line-height: 1.15; max-width: 760px; margin: 0 auto 16px; }
.welcome p { max-width: 560px; margin: 0 auto; color: var(--sand); opacity: .92; }
.welcome__list { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; list-style: none; padding: 0; margin: 32px 0 0; }
.welcome__list li { border: 1px solid rgba(246, 239, 227, .4); border-radius: 999px; padding: 8px 18px; font-weight: 500; }

/* ---------- Åbningstider og find vej ---------- */
.hours { width: 100%; border-collapse: collapse; }
.hours th, .hours td { text-align: left; padding: 12px 0; border-bottom: 1px solid var(--linje); font-weight: 400; }
.hours td { text-align: right; font-variant-numeric: tabular-nums; }
.hours tr.is-today th, .hours tr.is-today td { font-weight: 500; color: var(--klitgron); }
.hours tr.is-today th::after { content: " · i dag"; font-weight: 400; }
.info-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 20px; }
.info-list span { display: block; font-size: 15px; line-height: 22px; color: var(--daempet); }
.info-list a, .info-list p { font-family: var(--font-head); font-weight: 600; font-size: 22px; line-height: 28px; color: var(--espresso); text-decoration: none; margin: 0; }
.info-list a:hover { color: var(--klitgron); text-decoration: underline; }

.map {
  border-radius: var(--r-lg); overflow: hidden; border: 1px solid var(--linje);
  aspect-ratio: 4 / 3; background: var(--sand-mork);
}
.map iframe { width: 100%; height: 100%; border: 0; display: block; }

/* ---------- Undersider ---------- */
.page-hero { padding: 56px 0 48px; }
@media (min-width: 900px) { .page-hero { padding: 80px 0 64px; } }
.page-hero .lead { color: var(--daempet); max-width: 620px; }

/* ---------- Menukort ---------- */
.menu-nav {
  position: sticky; top: 80px; z-index: 20;
  background: var(--sand); border-bottom: 1px solid var(--linje);
}
@media (max-width: 899px) { .menu-nav { top: 68px; } }
.menu-nav ul { list-style: none; margin: 0; padding: 12px 0; display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; }
.menu-nav ul::-webkit-scrollbar { display: none; }
.menu-nav a {
  display: block; white-space: nowrap; padding: 8px 18px; border-radius: 999px;
  border: 1px solid var(--linje); background: var(--hvid);
  color: var(--espresso); text-decoration: none; font-weight: 500; font-size: 16px;
}
.menu-nav a:hover, .menu-nav a.is-active { background: var(--klitgron); border-color: var(--klitgron); color: var(--sand); }

.menu-section { padding: 64px 0; border-bottom: 1px solid var(--linje); scroll-margin-top: 140px; }
.menu-section:last-of-type { border-bottom: 0; }
.menu-section__head { display: grid; gap: 24px; margin-bottom: 40px; }
@media (min-width: 900px) {
  .menu-section { padding: 80px 0; }
  .menu-section__head { grid-template-columns: 1fr 1fr; gap: 64px; align-items: end; }
}
.menu-section__head .photo { aspect-ratio: 16 / 9; }
.menu-section__when { color: var(--klitgron); font-weight: 500; font-size: 15px; line-height: 22px; display: block; margin-bottom: 8px; }

.menu-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0 64px; }
@media (min-width: 900px) { .menu-list { grid-template-columns: 1fr 1fr; } }
.menu-item { padding: 20px 0; border-bottom: 1px dashed var(--linje); }
.menu-item__top { display: flex; align-items: baseline; gap: 16px; }
.menu-item h3 { font-size: 20px; line-height: 26px; margin: 0; }
.menu-item__price { margin-left: auto; font-weight: 500; white-space: nowrap; font-variant-numeric: tabular-nums; }
.menu-item p { color: var(--daempet); margin: 6px 0 0; font-size: 16px; line-height: 25px; }
.menu-item__origin { color: var(--klitgron); }
.tag {
  display: inline-block; font-size: 13px; line-height: 18px; font-weight: 500;
  padding: 2px 10px; border-radius: 999px; background: var(--sand-mork); color: var(--espresso);
  margin-left: 6px; vertical-align: 2px;
}

.note {
  display: flex; gap: 16px; align-items: flex-start;
  background: var(--hvid); border: 1px solid var(--linje); border-radius: var(--r-lg);
  padding: 24px 28px;
}

/* ---------- Om os ---------- */
.quote {
  font-family: var(--font-head); font-weight: 600;
  font-size: clamp(26px, 4vw, 36px); line-height: 1.25;
  margin: 0; max-width: 820px;
}
.quote-by { margin-top: 24px; color: var(--daempet); }
.photo-pair { display: grid; grid-template-columns: 3fr 2fr; gap: 16px; align-items: end; }
.photo-pair .photo:first-child { aspect-ratio: 4 / 5; }
.photo-pair .photo:last-child { aspect-ratio: 3 / 4; }

/* ---------- Bestil bord ---------- */
.form { display: grid; gap: 20px; }
.form__row { display: grid; gap: 20px; }
@media (min-width: 640px) {
  .form__row { grid-template-columns: 1fr 1fr; }
  .form__row > :first-child:nth-last-child(3) { grid-column: 1 / -1; }
}
@media (min-width: 1100px) {
  .form__row:has(> :nth-child(3)) { grid-template-columns: 1.3fr 1fr 1fr; }
  .form__row > :first-child:nth-last-child(3) { grid-column: auto; }
}
@media (min-width: 900px) { .split--form { grid-template-columns: 3fr 2fr; } }
.field label { display: block; font-weight: 500; margin-bottom: 8px; }
.field .req { font-weight: 400; color: var(--daempet); font-size: 15px; }
.field input, .field select, .field textarea {
  width: 100%; min-height: 52px; padding: 12px 16px;
  font: 400 17px/1.4 var(--font-body); color: var(--espresso);
  background: var(--hvid); border: 1px solid #CDBFA9; border-radius: var(--r-sm);
}
.field textarea { min-height: 120px; resize: vertical; }
/* iOS Safari: datofeltet bliver ellers bredere end kortet og centrerer teksten */
.field input[type="date"] {
  -webkit-appearance: none; appearance: none;
  display: block; min-width: 0; max-width: 100%;
  text-align: left; line-height: 26px;
}
.field input[type="date"]::-webkit-date-and-time-value { text-align: left; margin: 0; }
.field input[type="date"]::-webkit-calendar-picker-indicator { opacity: .6; cursor: pointer; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 3px solid rgba(78, 107, 74, .35); border-color: var(--klitgron); }
.field input[aria-invalid="true"], .field select[aria-invalid="true"] { border-color: var(--havtorn); }
.field__error { color: var(--havtorn); font-size: 15px; line-height: 22px; margin-top: 6px; }
.form .btn { justify-self: start; }
@media (max-width: 639px) { .form .btn { width: 100%; } }
.form__fine { font-size: 15px; line-height: 22px; color: var(--daempet); }

.thanks { text-align: center; padding: 16px 0; }
.thanks .straa { width: 40px; height: 48px; margin-bottom: 16px; }
.thanks[hidden] { display: none; }

/* ---------- Footer ---------- */
.site-footer { background: var(--espresso); color: var(--sand); padding: 64px 0 32px; }
.site-footer a { color: var(--sand); text-decoration: none; }
.site-footer a:hover { color: var(--hvid); text-decoration: underline; }
.site-footer__grid { display: grid; gap: 40px; }
@media (min-width: 768px) { .site-footer__grid { grid-template-columns: 1.4fr 1fr 1fr 1fr; } }
.site-footer__logo img { width: 190px; }
.site-footer h2 { font-family: var(--font-body); font-size: 15px; line-height: 22px; font-weight: 500; color: rgba(246, 239, 227, .7); margin-bottom: 12px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.site-footer p { color: rgba(246, 239, 227, .85); }
.site-footer__bottom {
  margin-top: 48px; padding-top: 24px; border-top: 1px solid rgba(246, 239, 227, .18);
  display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between;
  font-size: 14px; line-height: 20px; color: rgba(246, 239, 227, .7);
}
.site-footer__bottom a { color: rgba(246, 239, 227, .9); text-decoration: underline; }
