/* =========================================================
   Häuser mit Geschichte — Platzhalterseite
   Stylesheet
   ========================================================= */

@import url('../fonts/fonts.css');

/* ---------- Design tokens ---------- */
:root {
  --color-bg: #ffffff;
  --color-text: #000000;
  --color-link: #808080;        /* gray  */
  --color-link-hover: #000000;  /* black */
  --color-rule: #e0e0e0;

  --font-base: 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI',
               Helvetica, Arial, sans-serif;

  /* Heading sizes: 48px / 32px at desktop, fluid down on small screens */
  --size-h1: clamp(1.75rem, 7vw, 3rem);    /* max 48px */
  --size-h2: clamp(1.25rem, 4.5vw, 2rem);  /* max 32px */
  --size-body: clamp(1rem, 2.2vw, 1.125rem);

  --space-page: clamp(1.5rem, 5vw, 4rem);
  --logo-max: 460px;
  --content-max: 46rem;
}

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

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

body {
  margin: 0;
  background-color: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-base);
  font-size: var(--size-body);
  font-weight: 400;
  line-height: 1.7;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

img, svg { max-width: 100%; height: auto; display: block; }

/* ---------- Layout ---------- */
.page {
  min-height: 100vh;
  min-height: 100svh;          /* avoids mobile browser-chrome jump */
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: var(--space-page);
  gap: clamp(1.5rem, 4vw, 3rem);
}

.site-header,
.content,
.site-footer {
  width: 100%;
  max-width: var(--content-max);
  text-align: center;
}

.site-header { padding-top: clamp(0.5rem, 3vw, 2rem); }

.content { flex: 1 1 auto; }

/* ---------- Logo ---------- */
.logo {
  width: 100%;
  max-width: var(--logo-max);
  margin: 0 auto;
}

/* ---------- Typography ---------- */
h1, h2 {
  text-transform: uppercase;
  letter-spacing: 0.02em;
  margin: 0;
  /* prevent long German words breaking the layout on narrow screens */
  overflow-wrap: break-word;
  hyphens: auto;
}

h1 {
  font-size: var(--size-h1);     /* 48px desktop */
  font-weight: 700;
  line-height: 1.15;
  margin-block: clamp(1.5rem, 4vw, 2.5rem) 0.5rem;
}

h2 {
  font-size: var(--size-h2);     /* 32px desktop */
  font-weight: 600;
  line-height: 1.25;
  margin-block: 0 clamp(1.25rem, 3vw, 2rem);
}

p { margin-block: 0 1.25rem; }

.lead { max-width: 38rem; margin-inline: auto; }

.thanks {
  margin-top: clamp(1.5rem, 4vw, 2.5rem);
  font-weight: 600;
}

/* ---------- Links ---------- */
a {
  color: var(--color-link);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
  transition: color 0.18s ease;
  overflow-wrap: anywhere;      /* long mail addresses never overflow */
}

a:hover,
a:focus-visible { color: var(--color-link-hover); }

a:focus-visible {
  outline: 2px solid var(--color-link-hover);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ---------- Contact list ---------- */
.contacts {
  list-style: none;
  margin: clamp(1.5rem, 4vw, 2.5rem) auto;
  padding: 0;
  display: grid;
  gap: 1.25rem;
  justify-content: center;
  text-align: center;
}

.contact__name {
  display: block;
  font-weight: 600;
}

/* Mail address with the JS copy button stacked underneath it, so both
   contacts look identical no matter how long the address is */
.contact__action {
  margin-top: 0.35rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.contact__mail {
  display: inline-block;
  padding-block: 0.4rem;        /* comfortable tap target */
}

/* Two columns once there is room for them */
@media (min-width: 40rem) {
  .contacts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2rem;
  }
}

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--color-rule);
  padding-top: 1.25rem;
  font-size: 0.875rem;
  color: var(--color-link);
}

/* ---------- Copy feedback (JS enhancement) ---------- */
.copy-hint {
  display: block;
  font-size: 0.8125rem;
  color: var(--color-link);
  min-height: 1.4em;
}

/* ---------- Print ---------- */
@media print {
  a { color: #000; text-decoration: none; }
  .copy-hint { display: none; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

/* ---------- Copy button (injected by JS, see assets/js/main.js) ---------- */
.copy-button {
  display: inline-block;
  padding: 0.35rem 0.75rem;
  font-family: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-link);
  background: transparent;
  border: 1px solid var(--color-rule);
  border-radius: 2px;
  cursor: pointer;
  transition: color 0.18s ease, border-color 0.18s ease;
}

.copy-button:hover,
.copy-button:focus-visible {
  color: var(--color-link-hover);
  border-color: var(--color-link-hover);
}

.copy-button:focus-visible {
  outline: 2px solid var(--color-link-hover);
  outline-offset: 2px;
}

@media print {
  .copy-button { display: none; }
}
