/*
Theme Name: Yoga Kiel
Description: Block theme for yogakiel.de. Warm and calm, with the colors of the logo.
Version: 1.0.0
Requires at least: 6.6
Requires PHP: 8.0
Text Domain: yogakiel
*/

/* yogakiel.de: warm and calm. Colors come from the logo (copper, mauve). */

@font-face {
  font-family: "Fraunces";
  src: url("fonts/fraunces.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "Source Sans 3";
  src: url("fonts/source-sans-3.woff2") format("woff2");
  font-weight: 200 900;
  font-display: swap;
}

:root {
  --paper: #faf6f0;
  --sand: #f1e7da;
  --sand-hover: #eadccb;
  --mist: #ece5ec;
  --mist-hover: #e2d8e2;
  --ink: #3a302a;
  --ink-soft: #6b5d54;
  --copper: #a8703f;      /* shapes and lines only: 3.9:1 on paper */
  --copper-deep: #8c5a2e; /* text, links, buttons: 5.4:1 on paper */
  --mauve: #8a7a8f;
  /* The pointed corner comes from the tip of the logo drop. */
  --drop: 0 1.75rem 1.75rem 1.75rem;
  --drop-lg: 0 4rem 4rem 4rem;
  --serif: "Fraunces", Georgia, serif;
  --sans: "Source Sans 3", system-ui, sans-serif;
  --drop-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 130' preserveAspectRatio='none'%3E%3Cpath d='M50 0C50 0 0 50 0 80A50 50 0 0 0 100 80C100 50 50 0 50 0Z'/%3E%3C/svg%3E");
}

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 1.125rem/1.6 var(--sans);
}

a { color: var(--copper-deep); text-underline-offset: 0.2em; }
a:hover { color: var(--ink); }
:focus-visible { outline: 3px solid var(--copper-deep); outline-offset: 3px; }
::selection { background: var(--sand-hover); }

.wrap { width: min(100% - 2rem, 72rem); margin-inline: auto; }

.skip { position: absolute; left: -999px; }
.skip:focus { left: 1rem; top: 1rem; z-index: 10; background: #fff; padding: 0.5rem 1rem; }

/* Buttons. .yk.btn is the class in the existing page content. */
.btn, .yk.btn, .wpcf7-submit {
  display: inline-block;
  background: var(--copper-deep);
  color: #fff;
  font: 600 1.05rem/1 var(--sans);
  text-decoration: none;
  padding: 1rem 1.6rem;
  border: 0;
  border-radius: 0 999px 999px 999px;
  cursor: pointer;
  transition: background-color 0.2s;
}
.btn:hover, .yk.btn:hover, .wpcf7-submit:hover { background: var(--ink); color: #fff; }

/* Header */
.site-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 2rem;
  padding-block: 1rem;
}
.site-header .logo { margin-right: auto; }
.site-header .logo img { display: block; height: 5.5rem; width: auto; mix-blend-mode: multiply; }
.site-nav ul { display: flex; flex-wrap: wrap; gap: 0.1rem 1.5rem; margin: 0; padding: 0; list-style: none; }
.site-nav a {
  display: block;
  padding: 0.4rem 0;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 2px solid transparent;
}
.site-nav a:hover, .site-nav a[aria-current="page"] { border-bottom-color: var(--copper); }
.site-phone {
  padding: 0.4rem 1rem;
  border: 1.5px solid var(--copper-deep);
  border-radius: 0 999px 999px 999px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}
.site-phone:hover { background: var(--sand); }

/* Hero */
.hero { display: grid; gap: 2.5rem 4rem; align-items: center; padding-block: clamp(1.5rem, 5vw, 4.5rem); }
@media (min-width: 52rem) {
  .hero { grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); }
}
.hero h1 {
  margin: 0 0 1.25rem;
  font: 500 clamp(2.5rem, 1.4rem + 4.6vw, 4.75rem) / 1.02 var(--serif);
  letter-spacing: -0.02em;
  text-wrap: balance;
}
.hero .lead { max-width: 33rem; margin: 0; font-size: 1.3rem; }
.hero__cta { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.5rem; margin-top: 2rem; }
.hero__price { margin: 0; color: var(--ink-soft); }

/* The portrait sits in a drop. A copper outline draws itself once, as in the logo. */
.drop {
  position: relative;
  width: min(100% - 4rem, 21rem);
  aspect-ratio: 100 / 130;
  margin: 2rem;
  justify-self: center;
}
.drop img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 56% 20%;
  mix-blend-mode: multiply;
  -webkit-mask: var(--drop-mask) center / 100% 100% no-repeat;
  mask: var(--drop-mask) center / 100% 100% no-repeat;
  animation: fade 1.2s ease 0.3s backwards;
}
.drop__line {
  position: absolute;
  left: -8%;
  top: -7.7%;
  width: 116%;
  height: auto;
  overflow: visible;
  fill: none;
  stroke: var(--copper);
  stroke-width: 0.5;
  stroke-linejoin: round;
  pointer-events: none;
}
.drop__line path { stroke-dasharray: 1; animation: draw 2.4s cubic-bezier(0.5, 0, 0.2, 1) 0.15s backwards; }
@keyframes draw { from { stroke-dashoffset: 1; } }
@keyframes fade { from { opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  .drop img, .drop__line path { animation: none; }
}

/* Offer tiles: Yoga is the main offer, so it is the wide tile. */
.tiles { display: grid; gap: 1rem; padding-block: 1rem 3rem; }
@media (min-width: 52rem) {
  .tiles { grid-template-columns: repeat(3, 1fr); }
  /* The .tiles prefix wins over the base .tile rules below. */
  .tiles .tile--lead {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 1fr 1.4fr;
    align-items: start;
    gap: 0.75rem 3rem;
    padding: 2.25rem 2.5rem;
  }
  .tiles .tile--lead h3 { grid-row: 1 / span 3; }
  .tiles .tile--lead p { max-width: 46ch; }
  .tiles .tile--lead a { margin-top: 0.5rem; }
}
.tile {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1.5rem 1.75rem;
  background: var(--sand);
  border-radius: var(--drop);
  transition: background-color 0.2s;
}
.tile:hover { background: var(--sand-hover); }
.tile--mist { background: var(--mist); }
.tile--mist:hover { background: var(--mist-hover); }
.tile h3 { margin: 0; font: 500 1.6rem/1.15 var(--serif); }
.tile--lead h3 { font-size: clamp(2.2rem, 1.4rem + 3vw, 3.4rem); letter-spacing: -0.01em; }
.tile p { max-width: 34ch; margin: 0; }
.tile a { margin-top: auto; font-weight: 600; }
.tile a::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }

/* Page text. Used by the front page and by all pages of the block theme. */
.entry-content { max-width: 40rem; margin-inline: auto; }
.entry-content > :first-child { margin-top: 0; }
.entry-content h2 { margin: 2.75rem 0 0.6rem; font: 500 1.7rem/1.2 var(--serif); letter-spacing: -0.01em; }
.entry-content h3, .entry-content h4 { font-family: var(--serif); font-weight: 500; }
.entry-content p, .entry-content li { max-width: 62ch; }
.entry-content li::marker { color: var(--copper); }
.page-title {
  max-width: 40rem;
  margin: clamp(1rem, 4vw, 3rem) auto 1.5rem;
  font: 500 clamp(2.2rem, 1.4rem + 3vw, 3.6rem) / 1.05 var(--serif);
  letter-spacing: -0.02em;
  text-wrap: balance;
}

/* Course cards: the h4 and the table that follows it form one card. */
.entry-content h4 {
  margin: 1.5rem 0 0;
  padding: 1.25rem 1.5rem 0.5rem;
  background: var(--sand);
  border-radius: 0 1.75rem 0 0;
  font-size: 1.35rem;
  line-height: 1.25;
}
.entry-content table.noborder {
  width: 100%;
  background: var(--sand);
  border-collapse: separate;
  border-spacing: 0;
  border-radius: 0 0 1.75rem 1.75rem;
  margin: 0;
}
.entry-content table.noborder td { padding: 0.3rem 0.5rem; vertical-align: top; border: 0; }
.entry-content table.noborder td:first-child { width: 6rem; padding-left: 1.5rem; color: var(--ink-soft); }
.entry-content table.noborder td:last-child { padding-right: 1.5rem; }
.entry-content table.noborder tr:last-child td { padding-bottom: 1.25rem; }
/* The old page markup sets a fixed height and an indent. */
.entry-content table { height: auto !important; }
.entry-content div[style*="margin-left"] { margin-left: 0 !important; }

/* Contact form (Contact Form 7) */
.wpcf7 label { display: block; margin-bottom: 1rem; font-weight: 600; }
.wpcf7 input[type="text"], .wpcf7 input[type="email"], .wpcf7 textarea {
  display: block;
  width: 100%;
  max-width: 32rem;
  margin-top: 0.3rem;
  padding: 0.75rem 1rem;
  background: #fff;
  border: 1.5px solid var(--mauve);
  border-radius: 0 0.75rem 0.75rem 0.75rem;
  color: var(--ink);
  font: inherit;
}
.wpcf7 textarea { height: 9rem; }

/* Closing band */
.band {
  display: grid;
  gap: 1.5rem 3rem;
  margin-block: 3rem;
  padding: clamp(2rem, 5vw, 3.5rem);
  background: var(--copper-deep);
  border-radius: var(--drop-lg);
  color: #fff8ee;
}
@media (min-width: 52rem) {
  .band { grid-template-columns: 1.1fr 1fr; align-items: center; }
}
.band h2 { margin: 0 0 1rem; font: 500 clamp(2rem, 1.2rem + 3vw, 3rem) / 1.1 var(--serif); letter-spacing: -0.01em; }
.band p { margin: 0 0 1rem; max-width: 36rem; }
.band a:not(.btn) { color: inherit; }
.band .btn { background: var(--paper); color: var(--copper-deep); }
.band .btn:hover { background: #fff; color: var(--ink); }

/* Footer */
.site-footer { margin-top: 4rem; padding-block: 2.5rem; background: var(--mist); font-size: 1rem; }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem 3rem; }
.site-footer p { margin: 0; }
.site-footer a { color: var(--ink); }
.site-footer ul { display: flex; gap: 1.5rem; margin: 0; padding: 0; list-style: none; }

/* The stored contact form sets a 500px textarea and a 10px note. */
.wpcf7 textarea.wpcf7-textarea { width: 100%; }
.wpcf7 p[style*="font-size: 10px"] { font-size: 0.875rem !important; }

/* Active page marker for the fixed menu. WordPress sets the body classes. */
.home .site-nav a[href="/"],
.page-id-220 .site-nav a[href$="/hatha-yoga-kurse-kiel/"],
.page-id-196 .site-nav a[href$="/lachyoga-kiel/"],
.page-id-38 .site-nav a[href$="/shiatsu-kiel/"],
.page-id-45 .site-nav a[href$="/tai-chi/"],
.page-id-119 .site-nav a[href$="/kontakt/"] { border-bottom-color: var(--copper); }
