/* Klinikbyrån — klinikbyran.se
   Design: varm ljus botten, en accentfärg (djup grön), typografin bär sidan.
   Signaturelement: rubrikens understrykning i hero, som ritas in vid laddning. */

:root {
  --bg: #f5f1e9;
  --bg-band: #ece6d8;
  --ink: #211f1a;
  --ink-soft: #56534a;
  --accent: #1f4a3d;
  --accent-soft: #e2ece6;
  --line: #dcd4c1;
  --white: #fffdf9;

  --font-display: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, "Helvetica Neue", Arial, sans-serif;

  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2.5rem;
  --space-5: 4rem;
  --space-6: 6rem;

  --max-text: 38rem;
  --max-page: 68rem;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: inherit;
}

h1, h2, h3 {
  font-family: var(--font-display);
  line-height: 1.15;
  margin: 0;
  font-weight: 600;
}

p {
  margin: 0;
}

.container {
  max-width: var(--max-page);
  margin: 0 auto;
  padding: 0 var(--space-3);
}

.section {
  padding: var(--space-6) 0;
}

.section--band {
  background: var(--bg-band);
}

.eyebrow {
  display: inline-block;
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: var(--space-2);
}

.section-head {
  max-width: 34rem;
  margin: 0 0 var(--space-4);
}

.section-head h2 {
  font-size: clamp(1.6rem, 4vw, 2.1rem);
}

.lede {
  max-width: var(--max-text);
  font-size: 1.1rem;
  color: var(--ink-soft);
}

.lede + .lede {
  margin-top: var(--space-2);
}

/* Header */

.site-header {
  padding: var(--space-3) 0;
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-decoration: none;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.8rem 1.5rem;
  border-radius: 4px;
  background: var(--accent);
  color: var(--white);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid var(--accent);
  cursor: pointer;
}

.btn:hover {
  background: #163829;
}

.btn:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.btn--ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}

.btn--ghost:hover {
  background: var(--white);
}

.btn--small {
  padding: 0.6rem 1.1rem;
  font-size: 0.875rem;
}

/* Hero */

.hero {
  padding: var(--space-5) 0 var(--space-6);
}

.hero h1 {
  font-size: clamp(2rem, 6vw, 3.4rem);
  max-width: 20ch;
}

.hero .mark {
  position: relative;
  white-space: nowrap;
}

.hero .mark svg {
  position: absolute;
  left: 0;
  bottom: -0.12em;
  width: 100%;
  height: 0.35em;
  overflow: visible;
}

.hero .mark svg path {
  fill: none;
  stroke: var(--accent);
  stroke-width: 6;
  stroke-linecap: round;
  stroke-dasharray: 340;
  stroke-dashoffset: 340;
  animation: draw-underline 0.9s 0.5s ease-out forwards;
}

@media (prefers-reduced-motion: reduce) {
  .hero .mark svg path {
    animation: none;
    stroke-dashoffset: 0;
  }
}

@keyframes draw-underline {
  to {
    stroke-dashoffset: 0;
  }
}

.hero .lede {
  margin-top: var(--space-3);
  font-size: 1.2rem;
}

.hero .cta {
  margin-top: var(--space-4);
}

/* Problem */

.problem-body {
  max-width: var(--max-text);
}

.problem-body p {
  margin-top: var(--space-2);
  color: var(--ink-soft);
  font-size: 1.05rem;
}

.problem-body p:first-child {
  margin-top: 0;
}

.problem-body .callout {
  color: var(--ink);
  font-weight: 600;
  font-family: var(--font-display);
  font-size: 1.15rem;
  border-left: 3px solid var(--accent);
  padding-left: var(--space-2);
}

/* Features */

.feature-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: var(--space-3);
  grid-template-columns: 1fr;
}

.feature-item {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: var(--space-3);
}

.feature-item h3 {
  font-size: 1.05rem;
  margin-bottom: 0.4rem;
}

.feature-item p {
  color: var(--ink-soft);
  font-size: 0.98rem;
}

/* Pricing — signaturelement */

.pricing-grid {
  display: grid;
  gap: var(--space-3);
  grid-template-columns: 1fr;
  align-items: start;
}

.price-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: var(--space-4);
}

.price-card h3 {
  font-size: 1.15rem;
}

.price-card--highlight {
  background: var(--accent);
  color: var(--white);
  border-color: var(--accent);
  position: relative;
  padding-top: calc(var(--space-4) + 1.75rem);
}

.price-card--highlight .price-tag {
  position: absolute;
  top: -0.9rem;
  left: var(--space-4);
  background: var(--white);
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
}

.price-card--highlight .price-amount,
.price-card--highlight .price-note {
  color: var(--white);
}

.price-amount {
  display: block;
  margin-top: var(--space-2);
  font-family: var(--font-display);
  font-size: 2rem;
}

.price-amount small {
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 400;
  opacity: 0.85;
}

.price-note {
  margin-top: var(--space-1);
  font-size: 0.9rem;
  color: var(--ink-soft);
}

.price-terms {
  margin-top: var(--space-3);
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.price-frame {
  margin-top: var(--space-2);
  font-family: var(--font-display);
  font-size: 1.1rem;
}

/* Process */

.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: step;
  display: grid;
  gap: var(--space-3);
  grid-template-columns: 1fr;
}

.steps li {
  counter-increment: step;
  position: relative;
  padding-left: 3rem;
}

.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  font-family: var(--font-display);
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.steps h3 {
  font-size: 1.05rem;
}

.steps p {
  color: var(--ink-soft);
  margin-top: 0.3rem;
}

/* Contact */

.contact-grid {
  display: grid;
  gap: var(--space-4);
  grid-template-columns: 1fr;
}

.contact-info {
  font-size: 1.05rem;
}

.contact-info a {
  text-decoration: none;
  color: var(--accent);
  font-weight: 600;
}

.contact-list {
  list-style: none;
  padding: 0;
  margin: var(--space-3) 0 0;
  display: grid;
  gap: 0.6rem;
}

.field {
  margin-bottom: var(--space-2);
}

.field label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 0.3rem;
}

.field input {
  width: 100%;
  min-height: 44px;
  padding: 0.7rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--white);
  font: inherit;
  color: var(--ink);
}

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

.form-note {
  margin-top: var(--space-2);
  font-size: 0.85rem;
  color: var(--ink-soft);
}

/* Footer */

.site-footer {
  padding: var(--space-4) 0;
  border-top: 1px solid var(--line);
}

.site-footer .container {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  font-size: 0.85rem;
  color: var(--ink-soft);
}

.site-footer a {
  color: var(--ink-soft);
}

/* Reveal on scroll — progressive enhancement.
   Utan JS (klassen "js" saknas på <html>) är .reveal alltid synligt:
   sidan ska fungera fullt ut med JS avstängt. */

@media (prefers-reduced-motion: no-preference) {
  .js .reveal {
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.5s ease, transform 0.5s ease;
  }

  .js .reveal.is-visible {
    opacity: 1;
    transform: none;
  }
}

@media (min-width: 768px) {
  .feature-list {
    grid-template-columns: repeat(2, 1fr);
  }

  .pricing-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .steps {
    grid-template-columns: repeat(2, 1fr);
    column-gap: var(--space-4);
  }

  .contact-grid {
    grid-template-columns: 1.1fr 1fr;
  }
}

@media (min-width: 1100px) {
  .feature-list {
    grid-template-columns: repeat(3, 1fr);
  }
}
