:root {
  color-scheme: light;
  --paper: #f6f3f0;
  --ink: #332935;
  --subtle: #797079;
  --accent: #a97587;
  --edge: #e0d9d8;
  --panel: #fffcfa;
}

*, *::before, *::after { box-sizing: border-box; }
html { min-height: 100%; }
body {
  margin: 0;
  min-height: 100vh; /* Stöd även i webbläsare utan svh */
  min-height: 100svh;
  color: var(--ink);
  background: var(--paper);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
button, input, textarea { font: inherit; }
.close-dialog { text-decoration: none; }
button { cursor: pointer; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 5px; }

.page-shell {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  min-height: 100vh; /* Fallback om svh inte stöds */
  min-height: 100svh;
  overflow: hidden;
}
.page-shell::before {
  content: '';
  position: absolute;
  width: min(80vw, 850px);
  aspect-ratio: 1;
  right: max(-38vw, -470px);
  top: -460px;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(circle, rgb(231 214 222 / .50), rgb(246 243 240 / 0) 68%);
}
/* Centrera hela innehållsgruppen på höjden, även i höga/smala fönster. */
.site {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  padding: 64px 24px;
}
.hero { width: min(100%, 1120px); text-align: center; transform: translateY(-.5vh); }
.signal { display: block; width: 115px; height: 42px; margin: 0 auto 30px; color: var(--accent); overflow: visible; }
.eyebrow {
  margin: 0 0 23px;
  color: #8b6978;
  font-size: 10px;
  line-height: 1.4;
  font-weight: 600;
  letter-spacing: .225em;
  text-transform: uppercase;
}
h1 {
  margin: 0;
  font-family: "Iowan Old Style", "Baskerville", "Palatino Linotype", "Book Antiqua", Georgia, serif;
  font-size: clamp(4.4rem, 11.3vw, 10.8rem);
  font-weight: 400;
  letter-spacing: -.078em;
  line-height: 1.04;
  white-space: nowrap;
}
.domain-ending { color: var(--accent); }
.hero-line {
  margin: 34px 0 0;
  font-family: "Iowan Old Style", "Baskerville", "Palatino Linotype", Georgia, serif;
  font-size: clamp(1.26rem, 2.25vw, 1.9rem);
  font-weight: 400;
  letter-spacing: -.025em;
  line-height: 1.4;
}
.subtitle { margin: 12px 0 0; color: var(--subtle); font-size: 14px; line-height: 1.65; }
.contact-link {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  padding: 14px 0 12px;
  margin-top: 26px;
  text-decoration: none;
  border-bottom: 1px solid var(--ink);
  font-size: 13px;
  letter-spacing: .025em;
  font-weight: 600;
  transition: color .2s ease, border-color .2s ease;
}
.contact-link .arrow { color: var(--accent); font-size: 19px; font-weight: 400; line-height: 1; transition: transform .2s ease; }
.contact-link:hover { color: var(--accent); border-color: var(--accent); }
.contact-link:hover .arrow { transform: translate(2px,-2px); }
.contact-dialog {
  width: min(540px, calc(100% - 32px));
  max-width: none;
  max-height: min(760px, calc(100svh - 32px));
  overflow-y: auto;
  padding: 39px 42px 38px;
  margin: auto;
  color: var(--ink);
  background: var(--panel);
  border: 1px solid #ebe4e3;
  border-radius: 10px;
  box-shadow: 0 25px 95px rgb(31 23 34 / .17);
}
.contact-dialog[open]:not(:modal) { position: fixed; inset: 0; z-index: 10; }
.contact-dialog::backdrop { background: rgb(36 27 39 / .38); backdrop-filter: blur(4px); }
.dialog-head { display: flex; justify-content: space-between; align-items: start; gap: 20px; margin-bottom: 30px; }
.dialog-eyebrow { margin: 0 0 10px; color: var(--accent); font-size: 10px; text-transform: uppercase; letter-spacing: .13em; font-weight: 600; }
h2 { margin: 0; font-family: "Iowan Old Style", "Baskerville", "Palatino Linotype", Georgia, serif; font-size: 2.05rem; font-weight: 400; line-height: 1.24; letter-spacing: -.037em; }
.close-dialog { appearance: none; padding: 0 2px; border: 0; color: #8b808a; background: none; font: 300 30px/1 Arial,sans-serif; }
.close-dialog:hover { color: var(--ink); }
.field-row { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 15px; }
.field { margin-bottom: 21px; }
.field label { display: block; margin-bottom: 8px; color: #554b55; font-size: 12px; font-weight: 600; }
.field .optional { color: #9a8f97; font-weight: 400; }
.field input, .field textarea {
  display: block; width: 100%; min-height: 44px; padding: 10px 12px;
  color: var(--ink); background: transparent; border: 1px solid #d9d0d2;
  border-radius: 4px; font-size: 16px; line-height: 1.45;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.field textarea { resize: vertical; min-height: 96px; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.form-footer { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 20px; margin-top: 3px; }
.privacy-details { max-width: 225px; color: #817781; font-size: 11px; line-height: 1.6; }
.privacy-details summary { display: inline; cursor: pointer; text-decoration: underline; text-decoration-color: #c4bbc0; text-underline-offset: 4px; list-style: none; }
.privacy-details summary::-webkit-details-marker { display: none; }
.privacy-details summary:hover { color: var(--ink); text-decoration-color: currentColor; }
.privacy-details summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.privacy-details p { margin: 12px 0 0; }
.submit-button {
  display: inline-flex; align-items: center; justify-content: space-between; gap: 25px;
  padding: 13px 16px; min-height: 44px; border: 1px solid var(--ink);
  border-radius: 4px; color: #fff; background: var(--ink); font-size: 12px; font-weight: 600;
  transition: background .2s ease, border-color .2s ease;
}
.submit-button span { font-size: 18px; font-weight: 400; line-height: 1; }
.submit-button:hover { background: #5d4358; border-color: #5d4358; }
.message { padding: 15px; margin: 0 0 24px; border: 1px solid #c9d2c4; color: #34533c; font-size: 14px; line-height: 1.5; }
.message.error { border-color: #d9bdb8; color: #87443e; }
.success-note { display: block; margin-top: 7px; color: var(--subtle); font-size: 12px; }
.trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
@media (max-width: 720px) {
  .site { padding-block: 64px 50px; }
  .signal { margin-bottom: 25px; }
  .eyebrow { margin-bottom: 18px; }
  h1 { font-size: clamp(3.45rem, 12.3vw, 6rem); }
  .hero-line { margin-top: 25px; }
}
@media (max-width: 480px) {
  .site { padding: 68px 18px 50px; }
  .hero { transform: translateY(-1.5vh); }
  .signal { width: 100px; height: 35px; margin-bottom: 23px; }
  .eyebrow { font-size: 9px; letter-spacing: .16em; }
  h1 { font-size: clamp(2.8rem, 13.1vw, 4rem); letter-spacing: -.073em; }
  .hero-line { font-size: 1.3rem; margin-top: 25px; }
  .subtitle { font-size: 13px; }
  .contact-link { margin-top: 22px; }
  .contact-dialog { padding: 29px 23px 28px; border-radius: 8px; }
  .dialog-head { margin-bottom: 24px; }
  h2 { font-size: 1.85rem; }
  .field-row { grid-template-columns: 1fr; gap: 0; }
  .field { margin-bottom: 17px; }
  .form-footer { gap: 18px; }
  .privacy-details { max-width: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
