/* Murgia Group ApS — murgiagroup.com */

@font-face {
  font-family: "EB Garamond";
  src: url("/fonts/eb-garamond-500.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

:root {
  --paper: #f6f3ed;
  --ink: #0c1a2a;
  --muted: #59606a;
  --accent: #9c7e4a;
  --line: rgba(12, 26, 42, 0.12);
  --serif: "EB Garamond", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --max: 44rem;
  --gutter: clamp(1.25rem, 5vw, 2rem);
  --section: clamp(3rem, 8vw, 4.75rem);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0c1a2a;
    --ink: #f3efe7;
    --muted: #aaa59d;
    --line: rgba(243, 239, 231, 0.14);
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --paper: #0c1a2a;
  --ink: #f3efe7;
  --muted: #aaa59d;
  --line: rgba(243, 239, 231, 0.14);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
h1, h2, h3, p, dl, dd, ul { margin: 0; padding: 0; }
ul { list-style: none; }
a { color: inherit; text-decoration: none; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  color: var(--ink);
  font: 400 1.0625rem/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background-color 0.3s ease, color 0.3s ease;
}

main { flex: 1; }

::selection { background: rgba(156, 126, 74, 0.25); }

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

.wrap {
  width: min(var(--max), 100% - 2 * var(--gutter));
  margin-inline: auto;
}

/* One language at a time; Danish when nothing is set (also without JS). */
[data-l] { display: none; }
html:not([data-lang="en"]) [data-l="da"],
html[data-lang="en"] [data-l="en"] { display: inline; }

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 10;
  padding: 0.6rem 0.9rem;
  background: var(--ink);
  color: var(--paper);
  font-size: 0.875rem;
  font-weight: 600;
}
.skip:focus { top: 1rem; }

/* Header ------------------------------------------------------------------ */

.top { border-bottom: 1px solid var(--line); }

.top .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 4.5rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  font: 500 1.1875rem/1 var(--serif);
  letter-spacing: 0.005em;
}
.brand img { display: block; width: 28px; height: 28px; }

.controls { display: flex; align-items: center; gap: 0.125rem; }
html:not(.js) .controls { display: none; }

.controls button {
  appearance: none;
  border: 0;
  background: none;
  color: var(--muted);
  font: 600 0.72rem/1 var(--sans);
  letter-spacing: 0.12em;
  min-width: 2.5rem;
  height: 2.5rem;
  padding: 0 0.5rem;
  cursor: pointer;
  transition: color 0.2s ease;
}
.controls button:hover,
.controls button[aria-pressed="true"] { color: var(--ink); }
.controls button[aria-pressed="true"] {
  text-decoration: underline 1px var(--accent);
  text-underline-offset: 0.7em;
}

.theme { display: inline-grid; place-items: center; margin-left: 0.25rem; }
.theme svg { width: 15px; height: 15px; }
.theme .sun { display: none; }
:root[data-theme="dark"] .theme .sun { display: block; }
:root[data-theme="dark"] .theme .moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme .sun { display: block; }
  :root:not([data-theme="light"]) .theme .moon { display: none; }
}

/* Hero -------------------------------------------------------------------- */

.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: clamp(4rem, 12vw, 7.5rem) 0 var(--section);
}

/* Watermark: the MG monogram, faint, bleeding off the right edge. */
.hero::after {
  content: "";
  position: absolute;
  z-index: -1;
  top: 50%;
  right: -3rem;
  width: min(40rem, 55vw);
  aspect-ratio: 600 / 252;
  background: url("/monogram.svg") no-repeat center / contain;
  opacity: 0.07;
  transform: translateY(-58%);
  pointer-events: none;
}

.hero h1 {
  font: 500 clamp(2.75rem, 8.5vw, 4.75rem)/1.02 var(--serif);
  letter-spacing: -0.015em;
}

.rule {
  width: 2.5rem;
  height: 1px;
  margin: 1.75rem 0;
  border: 0;
  background: var(--accent);
  transform-origin: left;
}

.lead {
  max-width: 34rem;
  color: var(--muted);
  font-size: clamp(1.0625rem, 2.2vw, 1.1875rem);
  line-height: 1.7;
  text-wrap: pretty;
}

.facts {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem 3rem;
  margin-top: 2.75rem;
}

.label,
.facts dt {
  color: var(--muted);
  font: 600 0.68rem/1 var(--sans);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.facts dt { margin-bottom: 0.55rem; }
.facts dd { font-size: 0.975rem; }

/* Sections ---------------------------------------------------------------- */

.brands,
.contact {
  border-top: 1px solid var(--line);
  padding: var(--section) 0;
}
.contact { padding-bottom: calc(var(--section) * 1.15); }

.label { margin-bottom: 2.25rem; }

.brands li {
  display: grid;
  gap: 0.45rem 2.5rem;
  padding: 1.75rem 0;
  border-top: 1px solid var(--line);
}
.brands li:first-child { padding-top: 0; border-top: 0; }
.brands li:last-child { padding-bottom: 0; }

.brands h3 {
  font: 500 1.625rem/1.15 var(--serif);
  letter-spacing: -0.01em;
}

.brands p { max-width: 34rem; color: var(--muted); text-wrap: pretty; }

.brands a {
  justify-self: start;
  margin-top: 0.35rem;
  padding-bottom: 1px;
  border-bottom: 1px solid rgba(156, 126, 74, 0.6);
  font-size: 0.9375rem;
  transition: border-color 0.2s ease;
}
.brands a:hover { border-bottom-color: currentColor; }

.arrow {
  display: inline-block;
  margin-left: 0.35em;
  transition: transform 0.25s ease;
}
a:hover .arrow { transform: translateX(4px); }

@media (min-width: 46rem) {
  .brands li { grid-template-columns: 10.5rem 1fr; }
  .brands h3 { grid-row: span 2; padding-top: 0.1rem; }
}

.mail {
  font: 500 clamp(1.625rem, 4.5vw, 2.25rem)/1.3 var(--serif);
  letter-spacing: -0.005em;
  border-bottom: 1px solid var(--accent);
  transition: color 0.2s ease;
}
.mail:hover { color: var(--accent); }

/* Footer ------------------------------------------------------------------ */

footer {
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.8125rem;
  padding: 1.5rem 0 2rem;
}

/* 404 --------------------------------------------------------------------- */

.notfound { padding: clamp(4rem, 12vw, 7.5rem) 0 var(--section); }
.notfound .label { margin-bottom: 0; }
.notfound h1 { font: 500 clamp(2.25rem, 7vw, 3.5rem)/1.08 var(--serif); letter-spacing: -0.015em; margin-top: 1rem; }
.notfound .alt { margin-top: 0.4rem; color: var(--muted); font: 500 clamp(1.25rem, 3.4vw, 1.625rem)/1.3 var(--serif); }
.notfound .lead + .lead { margin-top: 0.3rem; }
.notfound .links { display: flex; flex-wrap: wrap; gap: 1rem 2.25rem; margin-top: 2.25rem; }
.notfound .links a { border-bottom: 1px solid var(--accent); padding-bottom: 1px; font-size: 0.9375rem; }

/* Motion ------------------------------------------------------------------ */

@media (prefers-reduced-motion: no-preference) {
  .hero h1, .hero .lead, .hero .facts {
    animation: rise 0.9s cubic-bezier(0.22, 1, 0.36, 1) both;
  }
  .hero .rule { animation: draw 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.15s both; }
  .hero .lead { animation-delay: 0.12s; }
  .hero .facts { animation-delay: 0.24s; }
  .hero::after { animation: fade 1.6s ease 0.2s both; }
}

@keyframes rise { from { opacity: 0; transform: translateY(14px); } }
@keyframes draw { from { transform: scaleX(0); } }
@keyframes fade { from { opacity: 0; } }

@media (max-width: 34rem) {
  .hero::after { width: 78vw; right: -22vw; top: 2.5rem; transform: none; opacity: 0.06; }
}
