/* =========================================================
   Louis Yungling – Piano Lessons
   A warm, quiet, spacious stylesheet.

   Contents
   1. Colours, fonts and spacing (change the look here)
   2. Base
   3. Layout helpers
   4. Buttons and links
   5. Header and menu
   6. Hero (welcome)
   7. Homepage sections
   8. Inner pages
   9. Contact
   10. Footer
   11. Larger screens
   ========================================================= */

/* ---------- 1. Colours, fonts and spacing ---------- */
:root {
  /* Warm palette */
  --cream: #fbf7f1; /* main background */
  --sand: #f3eadf; /* alternating sections */
  --sand-deep: #ead9c6; /* young pianists band, borders */
  --ink: #3a2e28; /* main text: warm dark brown */
  --ink-soft: #6b5a4f; /* secondary text */
  --terracotta: #a4553a; /* the one accent colour */
  --terracotta-d: #87442d; /* accent on hover */
  --white: #fffdfa;

  /* Type */
  --font-heading: "Cormorant Garamond", Georgia, serif;
  --font-body: "Source Sans 3", "Helvetica Neue", Arial, sans-serif;

  /* Spacing */
  --gutter: 1.25rem; /* side padding on phones */
  --section-pad: clamp(4rem, 10vw, 7.5rem);
  --max-width: 1120px;
  --narrow-width: 680px;
  --radius: 6px;
}

/* ---------- 2. Base ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
}

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem; /* 17px */
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

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

h1,
h2,
h3 {
  font-family: var(--font-heading);
  font-weight: 500;
  line-height: 1.15;
  color: var(--ink);
  margin: 0 0 0.6em;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.5rem, 7vw, 3.75rem);
  letter-spacing: -0.01em;
}
h2 {
  font-size: clamp(2rem, 5vw, 2.75rem);
}
h3 {
  font-size: 1.6rem;
  font-weight: 600;
}

p {
  margin: 0 0 1.1em;
}

a {
  color: var(--terracotta);
}
a:hover {
  color: var(--terracotta-d);
}

em {
  font-weight: bold;
}

:focus-visible {
  outline: 2px solid var(--terracotta);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -3rem;
  background: var(--ink);
  color: var(--white);
  padding: 0.5rem 1rem;
  z-index: 100;
}
.skip-link:focus {
  top: 1rem;
}

/* ---------- 3. Layout helpers ---------- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.narrow {
  max-width: var(--narrow-width);
}
.centered {
  text-align: center;
}

.section {
  padding: var(--section-pad) 0;
}
.section-tinted {
  background: var(--sand);
}

.section-head {
  max-width: var(--narrow-width);
  margin: 0 auto 3rem;
  text-align: center;
}
.section-head p {
  color: var(--ink-soft);
}

/* A personal line above a section heading */
.section-head .section-greeting {
  font-family: var(--font-heading);
  font-style: italic;
  font-size: 1.35rem;
  line-height: 1.45;
  color: var(--ink-soft);
  margin: 0 0 0.75rem;
}

.split {
  display: grid;
  gap: 3rem;
}

.eyebrow {
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--terracotta);
  margin-bottom: 1rem;
}

.lead {
  font-size: 1.25rem;
  line-height: 1.6;
}

.more-link {
  margin: 2.5rem 0 0;
}

/* ---------- 4. Buttons and links ---------- */
.button {
  display: inline-block;
  background: var(--terracotta);
  color: var(--white);
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-decoration: none;
  padding: 0.9rem 1.8rem;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background-color 0.2s ease;
}
.button:hover {
  background: var(--terracotta-d);
  color: var(--white);
}

/* Quiet link with an underline that sits a little lower */
.text-link {
  font-weight: 600;
  text-decoration: none;
  text-underline-offset: 0.3em;
}
.text-link:hover,
.text-link:focus-visible {
  text-decoration: underline;
  text-decoration-thickness: 1px;
}
.text-link::after {
  content: " →";
}

/* ---------- 5. Header and menu ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(251, 247, 241, 0.94);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--sand-deep);
}

.site-nav {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0.9rem var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}

.brand {
  text-decoration: none;
  color: var(--ink);
  line-height: 1.2;
}
.brand:hover {
  color: var(--ink);
}
.brand-name {
  display: block;
  font-family: var(--font-heading);
  font-size: 1.6rem;
  font-weight: 600;
}
.brand-tagline {
  display: block;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

/* Hidden checkbox that drives the mobile menu */
.menu-checkbox {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.menu-button {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 10px;
  cursor: pointer;
}
.menu-button span {
  display: block;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition:
    transform 0.25s ease,
    opacity 0.25s ease;
}
.menu-checkbox:focus-visible + .menu-button {
  outline: 2px solid var(--terracotta);
}

/* Open state: the three lines become an X */
.menu-checkbox:checked + .menu-button span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.menu-checkbox:checked + .menu-button span:nth-child(2) {
  opacity: 0;
}
.menu-checkbox:checked + .menu-button span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.nav-links {
  list-style: none;
  margin: 0;
  padding: 0;
  width: 100%;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}
.menu-checkbox:checked ~ .nav-links {
  max-height: 24rem;
}

.nav-links li:first-child {
  margin-top: 0.75rem;
}
.nav-links a {
  display: block;
  padding: 0.85rem 0;
  border-top: 1px solid var(--sand-deep);
  color: var(--ink);
  text-decoration: none;
  font-size: 1.05rem;
}
.nav-links a:hover,
.nav-links a.is-current {
  color: var(--terracotta);
}
.nav-links .nav-contact {
  color: var(--terracotta);
  font-weight: 600;
}

/* ---------- 6. Hero ---------- */
.hero {
  padding: 2.5rem 0 var(--section-pad);
  background: var(--sand);
}

.hero-inner {
  display: grid;
  gap: 2.5rem;
}

.hero-photo,
.about-photo {
  margin: 0;
  order: -1;
} /* photo first on phones */
.hero-photo img,
.about-photo img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  object-position: 30% 30%;
  border-radius: var(--radius);
}

.about-photo img {
  object-position: 50% 10% !important;
}

.hero-text p:not(.eyebrow):not(.lead) {
  color: var(--ink-soft);
}
.hero-text .button {
  margin-top: 0.75rem;
}

/* Quiet signpost under the hero button for beginners and parents */
.hero-signpost {
  margin: 1.75rem 0 0;
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--ink-soft);
}

.hero-signpost span {
  display: block; /* phones: one line each */
}

.hero-signpost span + span {
  margin-top: 0.35rem;
}

.hero-signpost a {
  color: var(--terracotta);
  font-weight: 600;
  text-decoration: none;
  text-underline-offset: 0.25em;
  white-space: nowrap;
}
.hero-signpost a:hover,
.hero-signpost a:focus-visible {
  color: var(--terracotta-d);
  text-decoration: underline;
  text-decoration-thickness: 1px;
}

.hero-signpost a::after {
  content: " →";
}

/* ---------- 7. Homepage sections ---------- */

/* Do any of these feel familiar? */
.feelings {
  display: grid;
  gap: 2.5rem;
  max-width: 900px;
  margin: 0 auto;
}
.feeling {
  text-align: center;
  max-width: 26rem;
  margin: 0 auto;
}
.feeling h3 {
  position: relative;
  padding-top: 1.1rem;
}
.feeling h3::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 2.5rem;
  height: 2px;
  background: var(--terracotta);
}
.feeling p {
  color: var(--ink-soft);
  margin: 0;
}

/* The rope parable */
.parable {
  margin: 3rem 0;
  padding: 0;
  font-family: var(--font-heading);
  font-style: italic;
  font-size: clamp(1.5rem, 4vw, 1.9rem);
  line-height: 1.45;
  color: var(--ink);
}
.parable::before {
  content: "";
  display: block;
  width: 3rem;
  height: 1px;
  background: var(--terracotta);
  margin: 0 auto 2rem;
}
.parable::after {
  content: "";
  display: block;
  width: 3rem;
  height: 1px;
  background: var(--terracotta);
  margin: 2rem auto 0;
}
.parable p {
  margin: 0;
}

/* How we work together */
.principles {
  display: grid;
  gap: 2.75rem;
  max-width: 1000px;
  margin: 0 auto;
}
.principle {
  text-align: center;
  max-width: 34rem;
  margin: 0 auto;
}
/* Small notation marks above the "How we work together" cards */
.principle-mark {
  display: block;
  width: 3rem;
  height: 3rem;
  margin: 0 auto 1rem;
  fill: var(--terracotta);
}
.principle p {
  color: var(--ink-soft);
  margin: 0;
}

.principle h3 {
  font-size: 1.45rem;
}

/* Testimonials */
.testimonials {
  display: grid;
  gap: 3.5rem;
}
.testimonial {
  margin: 0;
  text-align: center;
}
.testimonial-photo {
  width: 96px;
  height: 96px;
  margin: 0 auto 1.5rem;
  border-radius: 50%;
  object-fit: cover;
}
.testimonial blockquote {
  margin: 0 0 1.25rem;
}
.testimonial blockquote p {
  font-family: var(--font-heading);
  font-style: italic;
  font-size: 1.3rem;
  line-height: 1.5;
  margin: 0;
}
.testimonial figcaption {
  font-weight: 600;
  font-size: 0.95rem;
}
.testimonial figcaption span {
  display: block;
  font-weight: 400;
  color: var(--ink-soft);
}

/* Young pianists band */
.section-young {
  background: var(--sand-deep);
}
.split-young {
  max-width: 900px;
}
.young-photo {
  margin: 0;
}
.young-photo img {
  border-radius: var(--radius);
}

/* ---------- 8. Inner pages ---------- */
.page-hero {
  padding: clamp(3.5rem, 9vw, 6rem) 0 clamp(2.5rem, 6vw, 4rem);
  text-align: center;
}
.page-hero .lead {
  color: var(--ink-soft);
}

.prose h2 {
  margin-top: 2.5rem;
}
.prose h2:first-child {
  margin-top: 0;
}

.simple-list {
  padding-left: 1.2rem;
  margin: 0 0 1.5rem;
}
.simple-list li {
  margin-bottom: 0.5rem;
}
.simple-list li::marker {
  color: var(--terracotta);
}

.photo-grid {
  display: grid;
  gap: 1.5rem;
}
.photo-grid img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius);
}

.photo-placeholder {
  display: grid;
  place-items: center;
  aspect-ratio: 4 / 3;
  border: 1px dashed var(--sand-deep);
  border-radius: var(--radius);
  color: var(--ink-soft);
  font-size: 0.9rem;
  text-align: center;
  padding: 1rem;
}

/* PIANO JOURNAL LONG IMAGES */
.long-img-grid {
  grid-template-columns: repeat(3, 1fr);
  display: grid;
  gap: 0rem;
}

.long-img-grid img {
  object-fit: cover;
  border-radius: var(--radius);
}

.long-img {
  display: grid;
  place-items: center;
  padding: 1rem;
}

/* ---------- 9. Contact ---------- */
.section-contact {
  background: var(--sand);
}

.contact-intro p {
  color: var(--ink-soft);
}

.contact-details {
  margin: 2rem 0 0;
  display: grid;
  gap: 0.9rem;
}
.contact-details div {
  display: grid;
  grid-template-columns: 7rem 1fr;
  gap: 1rem;
}
.contact-details dt {
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
  padding-top: 0.15rem;
}
.contact-details dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.contact-form-wrap {
  background: var(--white);
  border-radius: var(--radius);
  padding: clamp(1.5rem, 5vw, 2.5rem);
  box-shadow:
    0 1px 2px rgba(58, 46, 40, 0.06),
    0 8px 30px rgba(58, 46, 40, 0.06);
}

.contact-form {
  display: grid;
  gap: 0.4rem;
}
.contact-form label {
  font-size: 0.9rem;
  font-weight: 600;
  margin-top: 0.75rem;
}
.contact-form label:first-of-type {
  margin-top: 0;
}
.contact-form input,
.contact-form textarea {
  width: 100%;
  font: inherit;
  font-size: 1rem; /* 16px stops iPhones zooming in */
  color: var(--ink);
  background: var(--cream);
  border: 1px solid var(--sand-deep);
  border-radius: var(--radius);
  padding: 0.75rem 0.9rem;
}
.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--terracotta);
  box-shadow: 0 0 0 3px rgba(164, 85, 58, 0.15);
}
.contact-form textarea {
  resize: vertical;
  min-height: 8rem;
}
.contact-form .button {
  margin-top: 1.25rem;
  justify-self: start;
}

.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-message {
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
}
.form-message p {
  margin: 0;
}
.form-message-success {
  background: #edf2e6;
  color: #3d4d2e;
}
.form-message-error {
  background: #f7e6df;
  color: #7a3420;
}

/* ---------- 10. Footer ---------- */
.site-footer {
  background: var(--ink);
  color: #e9dfd4;
  padding: 3.5rem 0 2.5rem;
  font-size: 0.95rem;
}
.footer-inner {
  display: grid;
  gap: 2rem;
}
.site-footer .brand-name {
  color: var(--white);
  font-size: 1.5rem;
  margin-bottom: 0.25rem;
}
.footer-brand p {
  margin: 0;
}
.footer-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.5rem;
}
.footer-links a {
  color: #e9dfd4;
  text-decoration: none;
}
.footer-links a:hover {
  color: var(--white);
  text-decoration: underline;
}
.footer-copy {
  margin: 0;
  color: #b9aa9c;
  font-size: 0.85rem;
}

/* ---------- 11. Larger screens ---------- */
@media (min-width: 700px) {
  :root {
    --gutter: 2rem;
  }

  .feelings {
    grid-template-columns: 1fr 1fr;
    gap: 3rem 4rem;
  }

  .testimonials {
    grid-template-columns: repeat(3, 1fr);
    gap: 3rem;
  }

  .photo-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  /* PIANO JOURNAL LONG IMAGES */
  .long-img-grid {
    gap: 1.5rem;
  }

  .footer-links {
    grid-template-columns: repeat(2, auto);
    justify-content: start;
    gap: 0.5rem 2.5rem;
  }
}

@media (min-width: 900px) {
  /* Desktop menu: always visible, no hamburger */
  .menu-button {
    display: none;
  }
  .site-nav {
    flex-wrap: nowrap;
  }
  .nav-links {
    display: flex;
    align-items: center;
    gap: 2rem;
    width: auto;
    max-height: none;
    overflow: visible;
  }
  .nav-links li:first-child {
    margin-top: 0;
  }
  .nav-links a {
    border: none;
    padding: 0.25rem 0;
    font-size: 0.98rem;
  }
  .nav-links .nav-contact {
    border: 1px solid var(--terracotta);
    border-radius: var(--radius);
    padding: 0.5rem 1.1rem;
  }
  .nav-links .nav-contact:hover {
    background: var(--terracotta);
    color: var(--white);
  }

  .hero {
    padding-top: 4.5rem;
  }
  .hero-inner {
    grid-template-columns: 1fr 1.05fr;
    align-items: center;
    gap: 4rem;
  }
  .hero-photo,
  .about-photo {
    order: 0;
  }
  .hero-photo img {
    aspect-ratio: 4 / 5;
    object-position: 25% 50%;
  }

  .about-photo img {
    aspect-ratio: 4 / 5;
    object-position: 50% 50% !important;
  }

  .split {
    grid-template-columns: 1fr 1fr;
    gap: 4.5rem;
    align-items: start;
  }
  .split-young {
    grid-template-columns: 1fr;
  }
  .split-young:has(.young-photo) {
    grid-template-columns: 1.1fr 1fr;
    align-items: center;
  }

  .footer-inner {
    grid-template-columns: 1.2fr 2fr;
    align-items: start;
  }
  .footer-copy {
    grid-column: 1 / -1;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(233, 223, 212, 0.15);
  }
}

/* PRINCIPLES on LARGER SCREEN */
@media (min-width: 1000px) {
  .principles {
    grid-template-columns: repeat(3, 1fr);
    max-width: 1080px;
    gap: 2.5rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  * {
    transition: none !important;
  }
}

/* ---------- 12. Articles ---------- */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
/* the Heart Logo */
.heart-mark {
  display: block;
  width: 3.25rem;
  height: 3.25rem;
  margin: 0 auto 1.1rem;
  fill: var(--terracotta);
}

/* List page */
.year-heading {
  font-size: 1.1rem;
  font-family: var(--font-body);
  font-weight: 600;
  letter-spacing: 0.14em;
  color: var(--ink-soft);
  border-bottom: 1px solid var(--sand-deep);
  padding-bottom: 0.6rem;
  margin: 3.5rem 0 0;
}
.year-heading:first-child {
  margin-top: 0;
}

.article-card {
  display: grid;
  gap: 1.25rem;
  padding: 2.25rem 0;
  border-bottom: 1px solid var(--sand-deep);
}
.article-card h3 {
  font-size: 1.85rem;
  margin-bottom: 0.5rem;
}
.article-card h3 a {
  color: var(--ink);
  text-decoration: none;
}
.article-card h3 a:hover {
  color: var(--terracotta);
}
.article-card p {
  color: var(--ink-soft);
}
.article-card-image img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  border-radius: var(--radius);
}

.article-meta {
  font-size: 0.85rem;
  color: var(--ink-soft);
  margin-bottom: 0.4rem;
}

.pager {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-top: 3rem;
}
.pager a {
  font-weight: 600;
  text-decoration: none;
}
.pager-count {
  color: var(--ink-soft);
  font-size: 0.9rem;
}
.pager-older {
  margin-left: auto;
}

/* Single article */
.article-header {
  padding-bottom: 2rem;
}
.article-back {
  margin-bottom: 2rem;
  font-size: 0.95rem;
}
.article-back a {
  text-decoration: none;
}

.article-cover {
  margin: 0 auto 1rem;
}
.article-cover img {
  width: 100%;
  border-radius: var(--radius);
}

.article-body {
  padding-top: 1.5rem;
  padding-bottom: 4rem;
  font-size: 1.125rem;
  line-height: 1.8;
}
.article-body h2 {
  font-size: 2rem;
  margin-top: 2.5em;
}
.article-body h3 {
  font-size: 1.5rem;
  margin-top: 2em;
}
.article-body img {
  width: 100%;
  border-radius: var(--radius);
  margin: 2rem 0;
}
.article-body blockquote {
  margin: 2.5rem 0;
  padding-left: 1.5rem;
  border-left: 2px solid var(--terracotta);
  font-family: var(--font-heading);
  font-style: italic;
  font-size: 1.45rem;
  line-height: 1.5;
}
.article-body blockquote p {
  margin: 0;
}
.article-body ul,
.article-body ol {
  padding-left: 1.3rem;
  margin: 0 0 1.4em;
}
.article-body li {
  margin-bottom: 0.4em;
}
.article-body li::marker {
  color: var(--terracotta);
}
.article-body hr {
  border: none;
  width: 3rem;
  height: 1px;
  background: var(--terracotta);
  margin: 3rem auto;
}

.article-nav {
  display: grid;
  gap: 1rem;
  padding-top: 2.5rem;
  border-top: 1px solid var(--sand-deep);
}
.article-nav-link {
  display: block;
  padding: 1.25rem 1.5rem;
  background: var(--sand);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--ink);
}
.article-nav-link:hover {
  background: var(--sand-deep);
  color: var(--ink);
}
.article-nav-label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--terracotta);
  margin-bottom: 0.25rem;
}
.article-nav-title {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  line-height: 1.3;
}
.article-all {
  margin: 2.5rem 0 var(--section-pad);
}

/* For Article IMG Captions/credits */
.article-cover figcaption {
  margin-top: 0.6rem;
  font-size: 0.85rem;
  font-style: italic;
  color: var(--ink-soft);
  text-align: center;
}

@media (min-width: 700px) {
  .article-card:has(.article-card-image) {
    grid-template-columns: 200px 1fr;
    gap: 2rem;
    align-items: start;
  }
  .article-card-image img {
    aspect-ratio: 1 / 1;
  }
  .article-nav {
    grid-template-columns: 1fr 1fr;
  }
  .article-nav-newer {
    text-align: right;
    grid-column: 2;
  }
}
.page-hero-tinted {
  background: var(--sand);
}
