/* =========================================================
   PTSDog.ch — styles
   Palette derived from the RM logo (cyan R + violet M)
   ========================================================= */

:root {
  --ink:        #232838;
  --ink-soft:   #565C70;
  --teal:       #1C6F94;  /* interactive, accessible on white */
  --teal-deep:  #145771;
  --sky:        #93D8F0;  /* the R */
  --violet:     #6E5E9E;  /* the M */
  --violet-deep:#574A82;
  --mist:       #EEF3F7;  /* cool page background */
  --lavender:   #ECE9F4;  /* soft section tint */
  --paper:      #FFFFFF;
  --line:       #DBE2EA;

  --font-display: 'Fraunces', Georgia, serif;
  --font-body:    'Hanken Grotesk', system-ui, sans-serif;
  --font-mono:    'Space Mono', ui-monospace, monospace;

  --maxw: 1120px;
  --radius: 18px;
  --shadow: 0 18px 50px -24px rgba(35, 40, 56, .35);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--mist);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { line-height: 1.1; margin: 0; font-weight: 600; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }

/* ---------- Grain overlay ---------- */
.grain {
  position: fixed; inset: 0;
  width: 100%; height: 100%;
  pointer-events: none; z-index: 1;
  opacity: .035; mix-blend-mode: multiply;
}

/* ---------- Shared bits ---------- */
.eyebrow {
  font-family: var(--font-mono);
  font-size: .72rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 1.1rem;
}
.section {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(4rem, 9vw, 7.5rem) clamp(1.25rem, 5vw, 3rem);
  position: relative; z-index: 2;
}
.section-head { max-width: 640px; margin-bottom: clamp(2.5rem, 5vw, 4rem); }
.section-head h2,
.section-leitung h2,
.leitung-body h2 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4.5vw, 3rem);
  font-weight: 500;
  letter-spacing: -.01em;
}
.section-intro {
  margin-top: 1.1rem;
  font-size: 1.075rem;
  color: var(--ink-soft);
}

/* ---------- Logo mark (RM) ---------- */
.brand-mark, .leitung-mark, .footer-brand .brand-mark {
  font-family: var(--font-body);
  font-weight: 800;
  letter-spacing: -.03em;
  line-height: 1;
}
.mark-r { color: var(--sky); }
.mark-m { color: var(--violet); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: .98rem;
  padding: .85rem 1.5rem;
  border-radius: 999px;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease, color .18s ease;
}
.btn-primary {
  background: var(--teal);
  color: #fff;
  box-shadow: 0 10px 22px -10px rgba(28, 111, 148, .7);
}
.btn-primary:hover { background: var(--teal-deep); transform: translateY(-2px); }
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}
.btn-ghost:hover { border-color: var(--violet); color: var(--violet-deep); transform: translateY(-2px); }

/* =========================================================
   HEADER
   ========================================================= */
.site-header {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: .9rem clamp(1.25rem, 5vw, 3rem);
  background: rgba(238, 243, 247, .82);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: .7rem; }
.brand .brand-mark { font-size: 1.7rem; }
.brand-words { display: flex; flex-direction: column; line-height: 1.05; }
.brand-name { font-weight: 800; font-size: 1.12rem; letter-spacing: -.01em; }
.brand-dot { color: var(--teal); }
.brand-by { font-size: .72rem; color: var(--ink-soft); letter-spacing: .01em; }

.site-nav { display: flex; align-items: center; gap: .35rem; }
.site-nav a {
  padding: .5rem .85rem;
  font-weight: 600; font-size: .94rem;
  color: var(--ink-soft);
  border-radius: 999px;
  transition: color .15s ease, background .15s ease;
}
.site-nav a:hover { color: var(--ink); }
.nav-cta {
  color: var(--teal) !important;
  border: 1.5px solid var(--line);
}
.nav-cta:hover { background: #fff; border-color: var(--teal); }

/* =========================================================
   HERO
   ========================================================= */
.hero {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(3rem, 8vw, 6rem) clamp(1.25rem, 5vw, 3rem) clamp(3rem, 6vw, 5rem);
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  align-items: center;
  gap: clamp(2rem, 5vw, 4rem);
  position: relative; z-index: 2;
}
.hero-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2.6rem, 6.5vw, 4.6rem);
  letter-spacing: -.02em;
  margin-bottom: 1.4rem;
}
.hero-lead {
  font-size: 1.18rem;
  color: var(--ink-soft);
  max-width: 38ch;
  margin-bottom: 2rem;
}
.hero-lead strong { color: var(--ink); font-weight: 700; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .8rem; }

/* Grounding rings */
.hero-visual { display: flex; flex-direction: column; align-items: center; gap: 1.2rem; }
.rings {
  position: relative;
  width: min(330px, 70vw);
  aspect-ratio: 1;
  display: grid; place-items: center;
}
.ring {
  position: absolute; inset: 0;
  border-radius: 50%;
  border: 1.5px solid var(--sky);
  opacity: 0;
  animation: breathe 6s ease-in-out infinite;
}
.ring-1 { animation-delay: 0s; border-color: var(--sky); }
.ring-2 { animation-delay: 2s; border-color: #B9C3E6; }
.ring-3 { animation-delay: 4s; border-color: var(--violet); }
.ring-core {
  width: 36%; aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, var(--sky), var(--violet));
  box-shadow: 0 16px 40px -12px rgba(110, 94, 158, .6);
  animation: corepulse 6s ease-in-out infinite;
}
@keyframes breathe {
  0%   { transform: scale(.45); opacity: 0; }
  35%  { opacity: .9; }
  100% { transform: scale(1); opacity: 0; }
}
@keyframes corepulse {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.08); }
}
.rings-caption {
  font-family: var(--font-mono);
  font-size: .72rem; letter-spacing: .14em; text-transform: uppercase;
  color: var(--violet-deep);
}

/* =========================================================
   TRAINING
   ========================================================= */
.task-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}
.task {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 2rem 1.75rem 2.1rem;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.task:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: transparent; }
.task-num {
  font-family: var(--font-mono);
  font-size: .85rem; color: var(--teal);
  display: inline-block; margin-bottom: 1rem;
}
.task h3 {
  font-family: var(--font-display);
  font-size: 1.4rem; font-weight: 500;
  margin-bottom: .7rem;
}
.task p { color: var(--ink-soft); font-size: 1rem; }
.task-foot {
  margin-top: 2.4rem;
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 2.4vw, 1.55rem);
  font-weight: 400; font-style: italic;
  color: var(--violet-deep);
  max-width: 30ch;
}

/* =========================================================
   LEITUNG
   ========================================================= */
.section-leitung { padding-top: 0; }
.leitung-card {
  background: linear-gradient(135deg, var(--lavender), #F4F1FA);
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 6px);
  padding: clamp(2rem, 5vw, 3.5rem);
  display: grid;
  grid-template-columns: auto 1fr;
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: center;
}
.leitung-mark {
  font-size: clamp(3.5rem, 9vw, 6rem);
  background: var(--paper);
  border-radius: var(--radius);
  padding: 1.4rem 1.6rem;
  box-shadow: var(--shadow);
}
.leitung-creds {
  font-family: var(--font-mono);
  font-size: .85rem; letter-spacing: .08em;
  color: var(--teal);
  margin: .6rem 0 1rem;
}
.leitung-text { color: var(--ink-soft); max-width: 48ch; margin-bottom: 1.4rem; }
.qual-list {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-direction: column; gap: .45rem;
}
.qual-list li {
  position: relative; padding-left: 1.4rem;
  font-size: .96rem; font-weight: 500;
}
.qual-list li::before {
  content: ""; position: absolute; left: 0; top: .55em;
  width: .55rem; height: .55rem; border-radius: 50%;
  background: linear-gradient(135deg, var(--sky), var(--violet));
}

/* =========================================================
   ZERTIFIKAT PRÜFEN
   ========================================================= */
.section-pruefen::before {
  /* soft band behind this section */
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(80% 120% at 100% 0%, rgba(147, 216, 240, .18), transparent 60%),
    radial-gradient(70% 110% at 0% 100%, rgba(110, 94, 158, .14), transparent 55%);
}
.verify {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: start;
}
.verify-form {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(1.75rem, 4vw, 2.5rem);
  box-shadow: var(--shadow);
}
.verify-label {
  display: block;
  font-family: var(--font-mono);
  font-size: .72rem; letter-spacing: .14em; text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: .7rem;
}
.verify-row { display: flex; gap: .6rem; flex-wrap: wrap; }
.verify-input {
  flex: 1 1 180px;
  font-family: var(--font-mono);
  font-size: 1.25rem;
  letter-spacing: .12em;
  padding: .85rem 1rem;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  background: var(--mist);
  color: var(--ink);
  transition: border-color .15s ease, background .15s ease;
}
.verify-input:focus {
  outline: none;
  border-color: var(--teal);
  background: #fff;
}
.verify-btn { flex: 0 0 auto; }
.verify-msg {
  min-height: 1.4em;
  margin-top: .9rem;
  font-size: .94rem;
  font-weight: 600;
}
.verify-msg.is-error { color: #B23A48; }
.verify-msg.is-ok    { color: var(--teal-deep); }

/* Record card */
.record {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(1.75rem, 4vw, 2.5rem);
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}
.record::before {
  /* embossed corner gradient like an official stamp paper */
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 6px;
  background: linear-gradient(90deg, var(--sky), var(--violet));
}
.record[hidden] { display: none; }
.record.show { animation: recordIn .55s cubic-bezier(.2,.7,.2,1) both; }
@keyframes recordIn {
  from { opacity: 0; transform: translateY(14px) scale(.98); }
  to   { opacity: 1; transform: none; }
}
.record-top {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 1.4rem;
}
.record-kicker {
  font-family: var(--font-mono);
  font-size: .72rem; letter-spacing: .16em; text-transform: uppercase;
  color: var(--violet-deep);
}
.record-seal svg { width: 48px; height: 48px; }
.seal-ring { fill: none; stroke: var(--teal); stroke-width: 2.5; opacity: .35; }
.seal-check {
  stroke: var(--teal); stroke-width: 3.5;
  stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: 40; stroke-dashoffset: 40;
}
.record.show .seal-check { animation: drawCheck .6s .35s ease forwards; }
@keyframes drawCheck { to { stroke-dashoffset: 0; } }

.record-fields { margin: 0; }
.rec-row {
  display: flex; justify-content: space-between; gap: 1rem;
  padding: .8rem 0;
  border-bottom: 1px dashed var(--line);
}
.rec-row:last-child { border-bottom: none; }
.rec-row dt {
  font-size: .9rem; color: var(--ink-soft); font-weight: 600;
}
.rec-row dd {
  margin: 0;
  font-family: var(--font-mono);
  font-size: .98rem; font-weight: 700;
  color: var(--ink);
  text-align: right;
}
.record-foot {
  margin-top: 1.4rem;
  font-size: .82rem; color: var(--ink-soft);
  font-style: italic;
}

/* =========================================================
   FOOTER
   ========================================================= */
.site-footer {
  position: relative; z-index: 2;
  background: var(--ink);
  color: #C9D0DD;
  margin-top: clamp(3rem, 6vw, 5rem);
}
.footer-grid {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(3rem, 6vw, 4.5rem) clamp(1.25rem, 5vw, 3rem) 2.5rem;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 2rem;
}
.footer-brand .brand-mark { font-size: 2.6rem; }
.footer-brand .mark-r { color: var(--sky); }
.footer-brand .mark-m { color: #A99BD6; }
.footer-claim { margin-top: .8rem; font-size: .9rem; color: #9AA3B5; max-width: 22ch; }
.footer-col h4 {
  font-family: var(--font-mono);
  font-size: .72rem; letter-spacing: .14em; text-transform: uppercase;
  color: #8A93A8; font-weight: 400;
  margin-bottom: .9rem;
}
.footer-col p { font-size: .96rem; color: #DDE3EE; }
.footer-col a { color: #DDE3EE; border-bottom: 1px solid transparent; transition: border-color .15s ease; }
.footer-col a:hover { border-color: var(--sky); }
.footer-base {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 1.3rem clamp(1.25rem, 5vw, 3rem);
  border-top: 1px solid rgba(255,255,255,.1);
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: .5rem;
  font-size: .82rem; color: #8A93A8;
}

/* =========================================================
   REVEAL ANIMATION
   ========================================================= */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 880px) {
  .hero { grid-template-columns: 1fr; }
  .hero-visual { order: -1; }
  .rings { width: min(240px, 60vw); }
  .task-grid { grid-template-columns: 1fr; }
  .leitung-card { grid-template-columns: 1fr; text-align: left; }
  .leitung-mark { justify-self: start; }
  .verify { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .site-nav a:not(.nav-cta) { display: none; }
  .footer-grid { grid-template-columns: 1fr; }
}

/* =========================================================
   REDUCED MOTION
   ========================================================= */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .ring, .ring-core { animation: none; opacity: .5; }
  .ring-1 { transform: scale(.6); }
  .ring-2 { transform: scale(.8); }
  .ring-3 { transform: scale(1); }
  .reveal { opacity: 1; transform: none; transition: none; }
  .record.show { animation: none; }
  .record.show .seal-check { animation: none; stroke-dashoffset: 0; }
}
