/*
 * Same look as zahnarztpraxis.art: the "porcelain and rose" palette, Fraunces for headlines and
 * Manrope for text. Plain CSS, no build step: edit this file and the page changes.
 */

/* ---------- Fonts (self-hosted, no requests to Google) ---------- */

@font-face {
  font-family: "Fraunces";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("fonts/fraunces-latin-full-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Fraunces";
  font-style: italic;
  font-weight: 100 900;
  font-display: swap;
  src: url("fonts/fraunces-latin-full-italic.woff2") format("woff2");
}
@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url("fonts/manrope-latin-wght-normal.woff2") format("woff2");
}

/* ---------- Colors and sizes ---------- */

:root {
  --font-sans: "Manrope", ui-sans-serif, system-ui, sans-serif;
  --font-display: "Fraunces", ui-serif, Georgia, serif;

  --canvas: #f7f4ef;
  --linen: #efeae2;
  --blush: #f4e6e3;

  --ink-950: #161312;
  --ink-900: #1c1917;
  --ink-600: #5c554f;
  --ink-300: #aea59e;

  --rose-200: #f0cdd2;
  --rose-300: #e7b3bb;
  --rose-600: #b45a6b;
  --rose-700: #9a4457;

  --text-display: clamp(3rem, 1.75rem + 5vw, 7rem);
  --text-heading: clamp(2.25rem, 1.5rem + 2.8vw, 4.5rem);
  --text-subheading: clamp(1.75rem, 1.4rem + 1.2vw, 2.5rem);
  --text-lead: clamp(1.0625rem, 1rem + 0.3vw, 1.25rem);
  --text-label: 0.6875rem;

  --hairline: rgb(28 25 23 / 0.1);
}

/* ---------- Base ---------- */

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

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-optical-sizing: auto;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--canvas);
  color: var(--ink-900);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.65;
}

main {
  flex: 1;
}

h1,
h2,
h3,
p {
  margin: 0;
}

a {
  color: inherit;
}

::selection {
  background: var(--rose-200);
  color: var(--ink-900);
}

:focus-visible {
  outline: 2px solid var(--rose-700);
  outline-offset: 2px;
}

.dark :focus-visible {
  outline-color: var(--rose-300);
}

.skip-link {
  position: absolute;
  left: -999px;
}
.skip-link:focus {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 50;
  padding: 0.75rem 1.25rem;
  border-radius: 999px;
  background: var(--ink-900);
  color: #fff;
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
}

/* ---------- Layout ---------- */

.container {
  width: 100%;
  max-width: 90rem;
  margin-inline: auto;
  padding-inline: 1.25rem;
}
@media (min-width: 40rem) {
  .container {
    padding-inline: 2rem;
  }
}
@media (min-width: 64rem) {
  .container {
    padding-inline: 3rem;
  }
}

.section {
  padding-block: 4rem;
}
@media (min-width: 40rem) {
  .section {
    padding-block: 6rem;
  }
}

/* ---------- Type ---------- */

/* Headlines: soft terminals, no wonky alternates. */
.display,
.heading,
.subheading,
.logo-name {
  font-family: var(--font-display);
  font-weight: 400;
  font-variation-settings:
    "SOFT" 60,
    "WONK" 0;
  text-wrap: balance;
}

.display {
  font-size: var(--text-display);
  line-height: 0.96;
  letter-spacing: -0.03em;
}
.heading {
  font-size: var(--text-heading);
  line-height: 1;
  letter-spacing: -0.025em;
}
.subheading {
  font-size: var(--text-subheading);
  line-height: 1.1;
  letter-spacing: -0.02em;
}

/* The second line of a headline, in italic rose. */
.accent {
  font-style: italic;
  color: var(--rose-700);
}
.dark .accent {
  color: var(--rose-300);
}

.lead {
  max-width: 42rem;
  font-size: var(--text-lead);
  line-height: 1.55;
  color: var(--ink-600);
  text-wrap: pretty;
}

/* Small uppercase label with a rose dot, above headlines. */
.eyebrow {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  font-size: var(--text-label);
  line-height: 1;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--rose-700);
}
.eyebrow::before {
  content: "";
  width: 0.375rem;
  height: 0.375rem;
  border-radius: 999px;
  background: currentColor;
}

.stack {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  border-bottom: 1px solid var(--hairline);
  background: rgb(247 244 239 / 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  height: 4.5rem;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  border-radius: 0.25rem;
}
.logo svg {
  width: 2rem;
  height: 2rem;
  color: var(--rose-600);
}
.logo-name {
  font-size: 1.375rem;
  line-height: 1;
  letter-spacing: -0.025em;
  color: var(--ink-900);
}

/* ---------- Buttons ---------- */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.625rem;
  height: 3rem;
  padding-inline: 1.5rem;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 0.9375rem;
  font-weight: 600;
  white-space: nowrap;
  text-decoration: none;
  transition:
    color 200ms,
    background-color 200ms,
    border-color 200ms,
    transform 200ms;
}
.button:active {
  transform: scale(0.98);
}
.button-sm {
  height: 2.5rem;
  padding-inline: 1.25rem;
  font-size: 0.875rem;
}

.button-primary {
  background: var(--ink-900);
  color: var(--canvas);
}
.button-primary:hover {
  background: var(--rose-700);
}

.button-secondary {
  border-color: rgb(28 25 23 / 0.2);
  color: var(--ink-900);
}
.button-secondary:hover {
  border-color: var(--ink-900);
  background: var(--ink-900);
  color: var(--canvas);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* ---------- Hero ---------- */

.hero {
  border-bottom: 1px solid var(--hairline);
  padding-block: 4rem 3.5rem;
}
@media (min-width: 40rem) {
  .hero {
    padding-block: 7rem 5rem;
  }
}
.hero .lead {
  margin-top: 0.5rem;
}
.hero .actions {
  margin-top: 1rem;
}

/* ---------- Letter ---------- */

/* A comfortable reading column for the letter's sections. */
.letter > * {
  max-width: 48rem;
}
.letter {
  font-size: 1.0625rem;
}
.letter p {
  color: var(--ink-600);
  text-wrap: pretty;
}
.letter strong {
  color: var(--ink-900);
  font-weight: 600;
}

.section + .section {
  border-top: 1px solid var(--hairline);
}
.section-tinted {
  background: var(--linen);
}

/* A web address, set large in the headline font. */
.address {
  align-self: flex-start;
  font-family: var(--font-display);
  font-size: var(--text-subheading);
  font-variation-settings:
    "SOFT" 60,
    "WONK" 0;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--rose-700);
  overflow-wrap: anywhere;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
  transition: color 200ms;
}
.address:hover {
  color: var(--ink-900);
}

/* Numbered steps with the site's serif numerals. */
.steps {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}
.steps li {
  counter-increment: step;
  position: relative;
  padding: 1.25rem 0 1.25rem 3rem;
  border-top: 1px solid var(--hairline);
  color: var(--ink-600);
}
.steps li:last-child {
  border-bottom: 1px solid var(--hairline);
}
.steps li::before {
  content: counter(step, decimal-leading-zero);
  position: absolute;
  left: 0;
  font-family: var(--font-display);
  color: var(--rose-700);
  font-variant-numeric: tabular-nums;
}

/* The sign-off name, in italic rose. */
.letter .signature-line {
  font-family: var(--font-display);
  font-style: italic;
  font-size: var(--text-subheading);
  line-height: 1.1;
  color: var(--rose-700);
}

/* ---------- Footer ---------- */

.site-footer {
  overflow: hidden;
  background: var(--ink-950);
  color: var(--ink-300);
  padding-top: 4rem;
}
.site-footer .bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 2rem;
  border-top: 1px solid rgb(255 255 255 / 0.12);
  font-size: 0.75rem;
}
.site-footer a {
  text-decoration: none;
  transition: color 200ms;
}
.site-footer a:hover {
  color: var(--canvas);
}
.site-footer .tagline {
  max-width: 20rem;
  margin-bottom: 4rem;
  color: var(--canvas);
}

/* The wordmark, oversized and tucked under the bottom edge. */
.signature {
  display: block;
  width: 100%;
  margin-top: 2.5rem;
  color: rgb(247 244 239 / 0.08);
  user-select: none;
}
.signature text {
  font-family: var(--font-display);
  font-variation-settings:
    "SOFT" 60,
    "WONK" 0;
  letter-spacing: -0.025em;
}

/* Lighthouse scores, four tiles in a row on wide screens. */
.scores {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  margin: 0;
}
@media (min-width: 40rem) {
  .scores {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
.scores div {
  display: flex;
  flex-direction: column-reverse;
  justify-content: flex-end;
  gap: 0.5rem;
  padding: 1.25rem;
  border-radius: 1rem;
  background: var(--linen);
}
.scores dt {
  font-size: var(--text-label);
  line-height: 1.3;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-600);
}
.scores dd {
  margin: 0;
  font-family: var(--font-display);
  font-size: var(--text-subheading);
  font-variation-settings:
    "SOFT" 60,
    "WONK" 0;
  line-height: 1;
  color: var(--rose-700);
  font-variant-numeric: tabular-nums;
}

/* Labels from the admin panel: set in semibold instead of a faked italic, which Manrope lacks. */
.letter em {
  font-style: normal;
  font-weight: 600;
  color: var(--ink-900);
}
