/*
 * style.css – Christliche Gemeinde Bad Kissingen · Transition page
 * Zeilenfreude · 23.11.2026
 *
 * Design direction A – "the cross is already standing":
 * The drawn crane is still building a cross on night blue; further down the real
 * driftwood cross from the worship room already stands. The website is a building site,
 * the congregation is not. Colours and type follow design draft 4 of the relaunch
 * (linen, night blue, gold) so this page already previews the coming website.
 *
 * Restraint: one bold typographic moment (the huge 10:15), one motion moment (the crane,
 * played once), everything else quiet. No uppercase labels, no identical shadow cards.
 *
 * Mobile first: base styles for phones, enhancements via min-width
 * (768 px tablet, 1024 px desktop). Font faces live in assets/fonts/fonts.css.
 *
 * Contents
 *  1. Tokens (colours, fonts, spacing)
 *  2. Base & typography
 *  3. Buttons & links
 *  4. Site header
 *  5. Intro on night blue
 *  6. Sunday service with photo
 *  7. Contact form
 *  8. Bible verse
 *  9. Legal pages, thank-you page, 404
 * 10. Site footer
 * 11. Illustration: crane & cross (drawing and animation)
 * 12. Tablet from 768 px
 * 13. Desktop from 1024 px
 */

/* ==========================================================================
   1. Tokens
   ========================================================================== */
:root {
  /* Colours – from the logo and design draft 4 */
  --color-night: #1c2836; /* header, intro, footer, headings */
  --color-night-hover: #2b3b4f;
  --color-ink: #3a4757; /* body text (8.6 : 1 on linen) */
  --color-on-night: rgba(255, 253, 249, 0.82); /* body text on night (≈ 11 : 1) */
  --color-linen: #f8f4ec; /* page background */
  --color-sand: #efe6d6; /* contact section */
  --color-paper: #fffdf9; /* form card, input fields */
  --color-gold: #c8902e; /* light: surfaces, lines, the cross – never small text on light */
  --color-gold-text: #8a5c12; /* gold as text on light (5.3 : 1) */
  --color-gold-light: #f1c97a; /* gold as text on night (9.5 : 1) */
  --color-wood: #ecdcbc; /* wooden cross in the illustration */
  --color-earth: #c9b591; /* dirt pile in the illustration */
  --color-field-border: #948670; /* input borders (3.5 : 1 on paper, WCAG 1.4.11 needs 3 : 1) */
  --color-field-border-hover: #7a6f5c;
  --color-line: rgba(28, 40, 54, 0.12); /* hairlines on light */
  --color-error: #a3281c; /* error messages (6 : 1 on paper) */

  /* Fonts */
  --font-heading: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  /* Spacing */
  --space-xs: 0.375rem;
  --space-s: 0.875rem;
  --space-m: 1.25rem;
  --space-l: 2rem;
  --space-xl: 3rem;
  --space-section: 3.5rem;
  --gutter: 1.25rem; /* side margin on phones */
  --max-width: 1200px;

  /* Shapes */
  --radius: 20px;
  --radius-l: 28px;
  --radius-field: 12px;
  --shadow: 0 24px 48px -32px rgba(28, 40, 54, 0.45);

  /* Motion – calm, the way a crane actually works */
  --ease: cubic-bezier(0.45, 0, 0.3, 1);
}

@media (min-width: 768px) {
  :root {
    --gutter: 2.5rem;
    --space-section: 5rem;
  }
}
@media (min-width: 1024px) {
  :root {
    --space-section: 6.5rem;
  }
}

/* ==========================================================================
   2. Base & typography
   ========================================================================== */
*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
/* Smooth scrolling to the form – only when motion is welcome */
@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}
body {
  margin: 0;
  background: var(--color-linen);
  color: var(--color-ink);
  font-family: var(--font-body);
  font-size: 1rem; /* 16 px */
  line-height: 1.6;
}
img,
svg {
  display: block;
  max-width: 100%;
  height: auto;
}
p,
h1,
h2,
h3,
ul,
figure,
blockquote {
  margin: 0;
}
:focus-visible {
  outline: 3px solid var(--color-gold-text);
  outline-offset: 3px;
  border-radius: 4px;
}

.container {
  width: 100%;
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* Screen readers only */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* "Skip to content" – only appears when tabbing */
.skip-link {
  position: absolute;
  top: -100px;
  left: 1rem;
  z-index: 10;
  padding: 0.75rem 1.25rem;
  border-radius: 999px;
  background: var(--color-gold-light);
  color: var(--color-night);
  font-weight: 600;
  text-decoration: none;
}
.skip-link:focus {
  top: 1rem;
}

/* Small label above a heading – deliberately sentence case, not tracked capitals */
.eyebrow {
  display: block;
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.4;
  color: var(--color-gold-text);
}
.eyebrow--light {
  color: var(--color-gold-light);
}

/* Missing details – highlighted yellow so they stand out before launch */
.placeholder-text {
  padding: 0 0.3em;
  border-radius: 4px;
  background: #fbe7c8;
  color: #6b4a14;
}

/* ==========================================================================
   3. Buttons & links
   ========================================================================== */
a {
  color: var(--color-gold-text);
  text-underline-offset: 0.18em;
}
a:hover {
  text-decoration-thickness: 2px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: flex-start;
  min-height: 50px;
  padding: 0 1.75rem;
  border: 0;
  border-radius: 999px;
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition:
    background-color 0.2s ease,
    transform 0.2s ease;
}
.btn:active {
  transform: translateY(1px);
}
.btn[disabled] {
  cursor: progress;
  opacity: 0.7;
}
/* Primary button: night blue with light text */
.btn--primary {
  background: var(--color-night);
  color: var(--color-paper);
}
.btn--primary:hover {
  background: var(--color-night-hover);
}

/* ==========================================================================
   4. Site header (night blue on every page)
   ========================================================================== */
.site-header {
  background: var(--color-night);
  color: var(--color-paper);
}
.site-header :focus-visible {
  outline-color: var(--color-gold-light);
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 1rem;
}
.logo img {
  width: 200px;
}
/* "Website im Umbau" notice – per the draft only from tablet up */
.site-header__notice {
  display: none;
  align-items: center;
  gap: 0.625rem;
  padding: 0.5rem 1rem;
  border: 1px solid rgba(241, 201, 122, 0.35);
  border-radius: 999px;
  color: var(--color-paper);
  font-size: 0.875rem;
  font-weight: 600;
}
.icon {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: var(--color-gold-light);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ==========================================================================
   5. Intro on night blue
   ========================================================================== */
.intro {
  padding-block: 1.5rem var(--space-section);
  background: var(--color-night);
  color: var(--color-on-night);
}
.intro :focus-visible {
  outline-color: var(--color-gold-light);
}
.intro__grid {
  display: flex;
  flex-direction: column;
  gap: var(--space-l);
}
.intro__text {
  display: flex;
  flex-direction: column;
  gap: var(--space-m);
}
.intro h1 {
  font-family: var(--font-heading);
  font-size: clamp(2.75rem, 1.6rem + 4.6vw, 4.75rem);
  font-weight: 400;
  line-height: 1.02;
  letter-spacing: -0.015em;
  color: var(--color-paper);
}
.intro h1 em {
  color: var(--color-gold-light);
}
.intro__lead {
  max-width: 30rem;
  font-size: 1.0625rem;
}
/* The drawing sits in its sand-coloured frame exactly as in the original design draft */
.intro__visual {
  padding: 1.125rem 0.75rem 0.5rem;
  border-radius: var(--radius);
  background: var(--color-sand);
}

/* ==========================================================================
   6. Sunday service with photo
   ========================================================================== */
.service {
  padding-block: var(--space-section);
}
.service__grid {
  display: flex;
  flex-direction: column;
  gap: var(--space-xl);
}
.service__text {
  display: flex;
  flex-direction: column;
  gap: var(--space-m);
}
/* "Jeden Sonntag um / 10:15 Uhr" – the time is the one loud element on the page */
.service__when {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  column-gap: 0.75rem;
  margin-top: var(--space-xs);
  font-family: var(--font-heading);
  color: var(--color-night);
}
.service__day {
  font-size: 1.5rem;
  font-style: italic;
  line-height: 1.2;
}
.service__day:first-child {
  flex-basis: 100%;
}
.service__time {
  font-size: clamp(5.5rem, 3rem + 11vw, 9.5rem);
  font-weight: 300;
  line-height: 0.9;
  letter-spacing: -0.04em;
  font-variant-numeric: lining-nums tabular-nums;
}
.service__colon {
  color: var(--color-gold);
}
.service__address {
  font-size: 1.125rem;
  color: var(--color-night);
}
.service__note {
  max-width: 26rem;
}
.service__photo img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius-l);
  background: var(--color-sand); /* placeholder colour while the image loads */
}

/* ==========================================================================
   7. Contact form
   ========================================================================== */
.contact-section {
  padding-block: var(--space-section);
  background: var(--color-sand);
}
.contact-section__grid {
  display: flex;
  flex-direction: column;
  gap: var(--space-l);
}
.contact-section__intro {
  display: flex;
  flex-direction: column;
  gap: var(--space-s);
  max-width: 28rem;
}
.contact-section h2 {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 1.6rem + 1.6vw, 2.75rem);
  font-weight: 400;
  line-height: 1.1;
  color: var(--color-night);
}
/* The form is the only card on the page */
.contact {
  padding: 1.5rem;
  border: 1px solid var(--color-line);
  border-radius: var(--radius);
  background: var(--color-paper);
  box-shadow: var(--shadow);
}
/* No focus ring around the whole card when the thank-you message takes focus */
.contact:focus {
  outline: none;
}
.contact__thanks {
  display: flex;
  flex-direction: column;
  gap: var(--space-s);
}
.contact__thanks h3 {
  font-family: var(--font-heading);
  font-size: 1.75rem;
  font-weight: 400;
  line-height: 1.15;
  color: var(--color-night);
}
.form {
  display: flex;
  flex-direction: column;
  gap: 1.125rem;
}
/* Error summary: only visible when there is something to say.
   Receives focus after a failed submit and links to each invalid field. */
.form__message {
  display: none;
  padding: 0.75rem 1rem;
  border-left: 4px solid var(--color-error);
  border-radius: 8px;
  background: #fbeeec;
  color: var(--color-error);
  font-size: 0.9375rem;
  font-weight: 500;
}
.form__message.is-visible {
  display: block;
}
.form__message:focus-visible {
  outline-color: var(--color-error);
}
.form__message ul {
  margin: 0.375rem 0 0;
  padding-left: 1.25rem;
}
.form__message a {
  color: var(--color-error);
}
.field {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}
.field > label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-night);
}
.field input,
.field textarea {
  width: 100%;
  min-height: 48px;
  padding: 0.75rem 0.875rem;
  border: 1.5px solid var(--color-field-border);
  border-radius: var(--radius-field);
  background: var(--color-paper);
  color: var(--color-night);
  font: inherit;
  font-size: 1rem; /* 16 px prevents zooming on iPhones */
  transition: border-color 0.2s ease;
}
.field textarea {
  min-height: 130px;
  resize: vertical;
}
.field input::placeholder,
.field textarea::placeholder {
  color: #7a8592;
}
.field input:hover,
.field textarea:hover {
  border-color: var(--color-field-border-hover);
}
.field input:focus-visible,
.field textarea:focus-visible {
  border-color: var(--color-night);
  outline-offset: 1px;
}
.field [aria-invalid="true"] {
  border-color: var(--color-error);
}
.field__error {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-error);
}
.field__error:empty {
  display: none;
}
/* Checkbox with text next to it */
.checkbox {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  font-size: 0.875rem;
  line-height: 1.5;
}
.checkbox input {
  flex: none;
  width: 20px;
  height: 20px;
  margin: 2px 0 0;
  accent-color: var(--color-night);
  cursor: pointer;
}
.checkbox input[aria-invalid="true"] {
  outline: 2px solid var(--color-error);
  outline-offset: 2px;
}
/* Honeypot: invisible to people, bots fill it in anyway */
.hp {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.form .btn {
  margin-top: 0.25rem;
}

/* ==========================================================================
   8. Bible verse – a quiet closing moment
   ========================================================================== */
.verse-section {
  padding: var(--space-section) var(--gutter);
}
.verse {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-m);
  max-width: 38rem;
  margin-inline: auto;
  text-align: center;
}
.verse__cross {
  width: 18px;
  fill: none;
  stroke: var(--color-gold);
  stroke-width: 1.5;
  stroke-linecap: round;
}
.verse blockquote {
  font-family: var(--font-heading);
  font-size: clamp(1.5rem, 1.2rem + 1.4vw, 2.125rem);
  font-style: italic;
  line-height: 1.35;
  color: var(--color-night);
}
.verse figcaption {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-gold-text);
}
.verse cite {
  font-style: normal;
}

/* ==========================================================================
   9. Legal pages, thank-you page, 404
   ========================================================================== */
.legal {
  max-width: 46rem;
  padding-block: var(--space-l) 4rem;
}
.legal h1 {
  margin: 0.5rem 0 1.5rem;
  font-family: var(--font-heading);
  font-size: clamp(2.25rem, 1.8rem + 2vw, 3rem);
  font-weight: 400;
  line-height: 1.1;
  color: var(--color-night);
  /* Hyphenate long words like "Datenschutzerklärung" on narrow phones instead of cutting them off */
  hyphens: auto;
  overflow-wrap: break-word;
}
.legal h2 {
  margin: 2rem 0 0.5rem;
  font-family: var(--font-heading);
  font-size: 1.375rem;
  font-weight: 500;
  line-height: 1.25;
  color: var(--color-night);
}
.legal p,
.legal ul {
  margin: 0 0 1rem;
}
.legal ul {
  padding-left: 1.25rem;
}
/* Notice box at the top of draft pages */
.notice {
  margin-bottom: 1.5rem;
  padding: 1.25rem 1.5rem;
  border-radius: var(--radius);
  background: var(--color-sand);
  font-size: 0.95rem;
}

/* ==========================================================================
   10. Site footer
   ========================================================================== */
.site-footer {
  padding-block: 2.5rem;
  background: var(--color-night);
  color: rgba(255, 253, 249, 0.75);
}
.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem 2rem;
}
.site-footer__logo img {
  width: 190px;
}
.site-footer__nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  width: 100%;
  font-size: 0.9375rem;
}
/* Tap area at least 44 px high */
.site-footer__nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--color-paper);
}
.site-footer__nav a[aria-current="page"] {
  color: var(--color-gold-light);
}
.site-footer :focus-visible {
  outline-color: var(--color-gold-light);
}

/* ==========================================================================
   11. Illustration: crane & cross
   Drawn in the design draft, here with classes instead of inline styles.
   Colours as in the original draft: night-blue outlines on the sand frame.
   Line colours are scene tokens, so the drawing could be recoloured in one place.
   ========================================================================== */
.construction-scene {
  --cs-line: var(--color-night); /* outlines */
  --cs-solid: var(--color-night); /* tracks, counterweight, hook, bucket */
  width: 100%;
}
.cs-outline {
  fill: none;
  stroke: var(--cs-line);
  stroke-width: 3;
  stroke-linejoin: round;
  stroke-linecap: round;
}
.cs-thin {
  fill: none;
  stroke: var(--cs-line);
  stroke-width: 2;
  stroke-linejoin: round;
}
.cs-gold,
.cs-gold-fill {
  fill: var(--color-gold);
}
.cs-wood {
  fill: var(--color-wood);
}
.cs-earth,
.cs-clod {
  fill: var(--color-earth);
}
.cs-night {
  fill: var(--cs-solid);
}
.cs-window {
  fill: var(--color-wood);
  stroke: var(--cs-line);
  stroke-width: 2;
}
.cs-grain {
  stroke: var(--color-night);
  stroke-width: 1.5;
  opacity: 0.35;
}
.cs-crumbs {
  stroke: var(--cs-line);
  stroke-width: 2;
  stroke-linecap: round;
  opacity: 0.35;
}
.cs-rope {
  stroke: var(--cs-line);
  stroke-width: 2;
}
.cs-rays {
  stroke: var(--color-gold);
  stroke-width: 2.5;
  stroke-linecap: round;
  opacity: 0.55;
}
.cs-arm-gold {
  fill: none;
  stroke: var(--color-gold);
  stroke-width: 12;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.cs-arm-line {
  fill: none;
  stroke: var(--color-night);
  stroke-width: 2.5;
  stroke-linejoin: round;
  opacity: 0.6;
}
.cs-stripe {
  stroke: var(--color-wood);
  stroke-width: 4;
}

/* Resting state = final picture */
.cs-glow {
  opacity: 0.95;
}
.cs-clod {
  opacity: 0;
}

/* Motion only when nobody has asked to reduce motion.
   It plays exactly once (about 4.2 s) and then rests on the finished cross:
   moving content longer than 5 seconds would need a pause button (WCAG 2.2.2),
   and one deliberate moment lands better than an endless loop. */
@media (prefers-reduced-motion: no-preference) {
  /* Crossbeam appears on the hook */
  .cs-beam {
    animation: cs-beam 0.4s ease-out both;
  }
  /* Crane rope and crossbeam come down and settle */
  .cs-lower {
    animation: cs-lower 2.8s var(--ease) 0.4s both;
  }
  /* The light comes on once the beam is in place */
  .cs-glow {
    animation: cs-glow 1s ease-out 3.2s both;
  }
  /* Excavator arm digs once; pivot in SVG coordinates */
  .cs-arm {
    transform-box: view-box;
    transform-origin: 205px 290px;
    animation: cs-arm 3.4s linear both;
  }
  .cs-clod {
    animation: cs-clod 1.7s linear 2 both;
  }
}

@keyframes cs-lower {
  from {
    transform: translateY(-110px);
  }
  to {
    transform: translateY(0);
  }
}
@keyframes cs-beam {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
@keyframes cs-glow {
  from {
    opacity: 0;
  }
  to {
    opacity: 0.95;
  }
}
@keyframes cs-arm {
  0% {
    transform: rotate(0deg);
  }
  40% {
    transform: rotate(-14deg);
  }
  75% {
    transform: rotate(4deg);
  }
  100% {
    transform: rotate(0deg);
  }
}
@keyframes cs-clod {
  0% {
    transform: translateY(0);
    opacity: 0;
  }
  50% {
    transform: translateY(18px);
    opacity: 1;
  }
  100% {
    transform: translateY(40px);
    opacity: 0;
  }
}

/* ==========================================================================
   12. Tablet from 768 px
   ========================================================================== */
@media (min-width: 768px) {
  .site-header__inner {
    padding-block: 1.375rem;
  }
  .logo img {
    width: 240px;
  }
  .site-header__notice {
    display: inline-flex;
  }
  .intro {
    padding-top: 2.5rem;
  }
  .intro__visual {
    padding: 1.75rem 1.5rem 1.125rem;
    border-radius: var(--radius-l);
  }
  .intro__lead {
    font-size: 1.1875rem;
    line-height: 1.65;
  }
  .contact {
    padding: 2.25rem;
  }
  .site-footer__nav {
    width: auto;
  }
  .site-footer__logo img {
    width: 220px;
  }
}

/* ==========================================================================
   13. Desktop from 1024 px – two columns
   ========================================================================== */
@media (min-width: 1024px) {
  .logo img {
    width: 260px;
  }
  .intro {
    padding-top: 3rem;
  }
  .intro__grid {
    display: grid;
    grid-template-columns: 5fr 6fr;
    align-items: center;
    gap: var(--space-xl);
  }
  .service__grid {
    display: grid;
    grid-template-columns: 5fr 6fr;
    align-items: center;
    gap: 4rem;
  }
  .contact-section__grid {
    display: grid;
    grid-template-columns: 5fr 6fr;
    align-items: start;
    gap: 4rem;
  }
  .contact-section__intro {
    position: sticky;
    top: 2rem;
    padding-top: 1rem;
  }
}
