/* dbtu.se — Ankaret. Same visual language as the app: deep water,
   Fraunces display, Inter body. No trackers, no external requests. */

@font-face {
  font-family: "Fraunces";
  src: url("/fonts/fraunces.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("/fonts/inter.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --deep: #0e3b45;
  --deep-2: #1e6e76;
  --accent: #9fe0e4;
  --ink: #16323a;
  --ink-soft: #4a656d;
  --paper: #f4fafa;
  --card: #ffffff;
  --line: #d7e7e9;
  --crisis: #b3453f;
  --maxw: 68rem;
}
@media (prefers-color-scheme: dark) {
  :root {
    --ink: #dff3f4;
    --ink-soft: #9fc2c6;
    --paper: #0b2830;
    --card: #10333d;
    --line: #1e4a54;
    --accent: #9fe0e4;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Inter", system-ui, sans-serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
  font-size: 1.06rem;
}
h1, h2, h3 {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.01em;
}
h1 { font-size: clamp(2.1rem, 5.5vw, 3.4rem); margin: 0 0 0.6rem; }
h2 { font-size: clamp(1.6rem, 3.6vw, 2.2rem); margin: 2.6rem 0 0.8rem; }
h3 { font-size: 1.22rem; margin: 1.6rem 0 0.4rem; }
p { margin: 0.75rem 0; }
a { color: var(--deep-2); }
@media (prefers-color-scheme: dark) { a { color: var(--accent); } }
img { max-width: 100%; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 1.25rem; }
.narrow { max-width: 46rem; }

/* Header + hero on the water gradient */
.hero {
  background: linear-gradient(175deg, var(--deep) 0%, var(--deep-2) 90%);
  color: #eaf7f8;
  padding-bottom: 4rem;
  position: relative;
  overflow: hidden;
}
.hero::after {
  content: "";
  position: absolute; inset: auto 0 0 0; height: 5rem;
  background:
    radial-gradient(120% 3.4rem at 50% 100%, var(--paper) 49%, transparent 51%);
}
.hero a { color: #eaf7f8; }
nav {
  display: flex; align-items: center; gap: 1.1rem; flex-wrap: wrap;
  padding: 1.1rem 0;
  font-size: 0.98rem;
}
nav .brand {
  display: flex; align-items: center; gap: 0.55rem;
  font-family: "Fraunces", serif; font-size: 1.25rem; font-weight: 600;
  text-decoration: none; margin-right: auto;
}
nav .brand img { width: 2rem; height: 2rem; border-radius: 0.55rem; }
nav a { text-decoration: none; opacity: 0.92; }
nav a:hover { opacity: 1; text-decoration: underline; }

.hero-inner { padding: 2.5rem 0 2rem; max-width: 44rem; }
.hero .tagline { font-size: 1.25rem; opacity: 0.95; max-width: 38rem; }
.hero .fine { opacity: 0.75; font-size: 0.92rem; }

.cta-row { display: flex; gap: 0.8rem; flex-wrap: wrap; margin: 1.6rem 0 0.6rem; }
.btn {
  display: inline-block; padding: 0.85rem 1.5rem; border-radius: 999px;
  text-decoration: none; font-weight: 600; font-size: 1.02rem;
  border: 2px solid transparent;
}
.btn.primary { background: var(--accent); color: var(--deep); }
.btn.primary:hover { filter: brightness(1.06); }
.btn.ghost { border-color: rgba(234,247,248,0.55); color: #eaf7f8; }
.btn.ghost:hover { border-color: #eaf7f8; }
main .btn.primary { background: var(--deep-2); color: #fff; }
.badge {
  display: inline-block; font-size: 0.78rem; font-weight: 600;
  padding: 0.15rem 0.6rem; border-radius: 999px;
  background: var(--accent); color: var(--deep);
  vertical-align: middle; margin-left: 0.4rem;
}

/* Cards and grids */
.grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); margin: 1.4rem 0; }
.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: 1.1rem; padding: 1.3rem 1.4rem;
}
.card h3 { margin-top: 0.2rem; }
.card .icon { font-size: 1.7rem; }
.card p { color: var(--ink-soft); font-size: 0.98rem; margin-bottom: 0; }
a.card { text-decoration: none; color: inherit; display: block; }
a.card:hover { border-color: var(--deep-2); }
.card .meta { font-size: 0.85rem; color: var(--ink-soft); margin-top: 0.6rem; }

/* Sample blocks */
.sample {
  background: var(--card); border-left: 4px solid var(--accent);
  border-radius: 0 1rem 1rem 0; padding: 1.1rem 1.4rem; margin: 1.2rem 0;
}
.sample.quote { font-style: italic; }
.sample .src { font-style: normal; font-size: 0.85rem; color: var(--ink-soft); margin-top: 0.6rem; }
ol.steps { padding-left: 1.3rem; }
ol.steps li { margin: 0.55rem 0; }

/* Easy-read blocks */
.easy { display: flex; gap: 0.9rem; align-items: flex-start; margin: 1rem 0; }
.easy .eicon {
  flex: 0 0 3rem; height: 3rem; border-radius: 50%;
  background: var(--deep-2); color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 1.35rem;
}
.easy p { margin: 0.35rem 0 0; font-size: 1.15rem; }

/* Journey */
.journey { border-left: 3px solid var(--line); margin: 1.5rem 0; padding-left: 1.4rem; }
.journey .jp { margin: 0 0 1.6rem; }
.journey .jicon { font-size: 1.5rem; }
.journey p { margin: 0.3rem 0; }

/* Article body */
article { max-width: 44rem; }
article ul { padding-left: 1.3rem; }
article li { margin: 0.35rem 0; }
.lead { font-size: 1.18rem; color: var(--ink-soft); }

/* Crisis strip */
.crisis-strip {
  background: var(--crisis); color: #fff; text-align: center;
  padding: 0.55rem 1rem; font-size: 0.95rem;
}
.crisis-strip a { color: #fff; font-weight: 700; }

/* FAQ */
details {
  background: var(--card); border: 1px solid var(--line);
  border-radius: 0.9rem; padding: 0.9rem 1.2rem; margin: 0.6rem 0;
}
summary { font-weight: 600; cursor: pointer; }

/* Footer */
footer {
  margin-top: 4rem; padding: 2.5rem 0 3rem;
  background: var(--deep); color: #cfe8ea; font-size: 0.94rem;
}
footer a { color: #eaf7f8; }
footer .cols { display: flex; gap: 3rem; flex-wrap: wrap; }
footer .disclaimer { max-width: 34rem; opacity: 0.85; }

.center { text-align: center; }
.section-kicker {
  text-transform: uppercase; letter-spacing: 0.12em; font-size: 0.8rem;
  font-weight: 700; color: var(--deep-2); margin: 2.8rem 0 -0.4rem;
}
@media (prefers-color-scheme: dark) { .section-kicker { color: var(--accent); } }
hr { border: none; border-top: 1px solid var(--line); margin: 2.5rem 0; }

/* ---------- Levande detaljer: vågor, bubblor, andning, reveal ---------- */

/* Animated waves at the hero's edge — the app's water, on the web. */
.waves {
  position: absolute; left: 0; right: 0; bottom: -2px; height: 5.5rem;
  overflow: hidden; pointer-events: none;
}
.waves span {
  position: absolute; left: 0; bottom: 0; width: 200%; height: 100%;
  background-repeat: repeat-x; background-position: 0 bottom;
  background-size: 50% 100%;
}
.waves .w1 {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 88' preserveAspectRatio='none'%3E%3Cpath d='M0,44 C150,88 300,8 450,40 C600,72 750,16 900,44 C1050,72 1150,30 1200,44 L1200,88 L0,88 Z' fill='rgba(159,224,228,0.16)'/%3E%3C/svg%3E");
  animation: drift 26s linear infinite;
}
.waves .w2 {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 88' preserveAspectRatio='none'%3E%3Cpath d='M0,56 C200,20 400,84 600,52 C800,20 1000,80 1200,48 L1200,88 L0,88 Z' fill='%23f4fafa'/%3E%3C/svg%3E");
  animation: drift 18s linear infinite reverse;
}
@media (prefers-color-scheme: dark) {
  .waves .w2 {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 88' preserveAspectRatio='none'%3E%3Cpath d='M0,56 C200,20 400,84 600,52 C800,20 1000,80 1200,48 L1200,88 L0,88 Z' fill='%230b2830'/%3E%3C/svg%3E");
  }
}
@keyframes drift { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.hero { padding-bottom: 6.5rem; }
.hero::after { display: none; }

/* Rising light bubbles, like the app's water backdrop. */
.bub {
  position: absolute; bottom: -20px; border-radius: 50%;
  width: var(--s); height: var(--s); left: var(--x);
  background: radial-gradient(circle at 35% 30%, rgba(234,247,248,0.5), rgba(159,224,228,0.08));
  animation: rise var(--d) linear infinite; animation-delay: var(--w);
  pointer-events: none;
}
@keyframes rise {
  0% { transform: translateY(0) translateX(0); opacity: 0; }
  8% { opacity: 0.7; }
  90% { opacity: 0.25; }
  100% { transform: translateY(-85vh) translateX(2rem); opacity: 0; }
}

/* Hero layout: text + breathing mark side by side. */
.hero-inner {
  display: grid; grid-template-columns: minmax(0, 1fr); gap: 2rem;
  align-items: center; max-width: var(--maxw);
  padding: 2.75rem 1.25rem 2.5rem;
}
@media (min-width: 54rem) {
  .hero-inner { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); }
}
.hero-text { max-width: 44rem; }

/* The breathing mark: slow scale + soft expanding rings. */
.orb-wrap { display: flex; justify-content: center; }
.orb {
  position: relative; width: min(17rem, 56vw); aspect-ratio: 1;
  display: flex; align-items: center; justify-content: center;
}
.orb::before, .orb::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  border: 1.5px solid rgba(159,224,228,0.45);
  animation: ring 7s ease-out infinite;
}
.orb::after { animation-delay: 3.5s; }
@keyframes ring {
  0% { transform: scale(0.62); opacity: 0; }
  25% { opacity: 0.6; }
  100% { transform: scale(1.08); opacity: 0; }
}
.orb img {
  width: 62%; filter: drop-shadow(0 0 34px rgba(159,224,228,0.35));
  animation: breathe 9s ease-in-out infinite;
}
@keyframes breathe {
  0%, 100% { transform: scale(1); }
  44% { transform: scale(1.055); }
  56% { transform: scale(1.055); }
}

/* Breathing demo — the app's core, try it right on the page. */
.breath-demo {
  display: flex; flex-direction: column; align-items: center; gap: 1.2rem;
  padding: 2.6rem 1rem 2.2rem; margin: 1.6rem 0;
  background: linear-gradient(165deg, var(--deep) 0%, var(--deep-2) 100%);
  border-radius: 1.6rem; color: #eaf7f8; position: relative; overflow: hidden;
}
.breath-circle {
  width: 9.5rem; aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle at 38% 32%, rgba(234,247,248,0.85), rgba(159,224,228,0.55) 58%, rgba(159,224,228,0.22));
  box-shadow: 0 0 60px rgba(159,224,228,0.35);
  animation: demo-breathe 10s ease-in-out infinite;
}
@keyframes demo-breathe {
  0%, 100% { transform: scale(0.72); }
  40% { transform: scale(1); }
  52% { transform: scale(1); }
}
.breath-label { position: relative; height: 1.6rem; font-size: 1.12rem; letter-spacing: 0.02em; }
.breath-label span {
  position: absolute; left: 50%; transform: translateX(-50%);
  white-space: nowrap; opacity: 0; animation: label 10s linear infinite;
}
.breath-label span:nth-child(2) { animation-delay: 5s; }
@keyframes label {
  0% { opacity: 0; }
  6%, 42% { opacity: 1; }
  50%, 100% { opacity: 0; }
}
.breath-demo .hint { font-size: 0.9rem; opacity: 0.75; margin: 0; }

/* Scroll reveal (JS adds .reveal + .in; hidden state only when JS runs). */
.js .reveal { opacity: 0; transform: translateY(18px); }
.js .reveal.in {
  opacity: 1; transform: none;
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Softer, livelier surfaces. */
.card { transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease; }
.card:hover { transform: translateY(-3px); box-shadow: 0 10px 30px rgba(14,59,69,0.10); }
.card .icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 2.9rem; height: 2.9rem; border-radius: 0.95rem; font-size: 1.35rem;
  background: linear-gradient(150deg, rgba(159,224,228,0.35), rgba(30,110,118,0.14));
  margin-bottom: 0.35rem;
}
.btn { transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease; }
.btn.primary { box-shadow: 0 6px 20px rgba(14,59,69,0.22); }
.btn.primary:hover { transform: translateY(-2px); }
hr {
  height: 12px; border: 0; opacity: 0.5; background-repeat: repeat-x; background-size: auto 100%;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 240 12'%3E%3Cpath d='M0,6 C30,0 50,12 80,6 C110,0 130,12 160,6 C190,0 210,12 240,6' stroke='%239fe0e4' stroke-width='1.6' fill='none'/%3E%3C/svg%3E");
}

/* Stillness is a feature: every animation stops on request. */
@media (prefers-reduced-motion: reduce) {
  .waves span, .bub, .orb::before, .orb::after, .orb img,
  .breath-circle, .breath-label span { animation: none; }
  .breath-label span:first-child { opacity: 1; }
  .bub { display: none; }
  .js .reveal { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}
