/*
  Hearth & Clay Studio - styles

  Change the colours and fonts here; the rest of the file uses these names.
*/
:root {
  /* Colours, taken from the glaze and clay in the photos */
  --paper: #fbf7f1;      /* page background */
  --cream: #f3eadf;      /* intro and contact background */
  --ink: #2f241c;        /* main text */
  --muted: #65544a;      /* secondary text */
  --clay: #9a4f2c;       /* buttons, labels, accents */
  --clay-dark: #6b3820;  /* classes band background */
  --line: #ddcdbb;       /* thin divider lines */
  --on-dark: #f7efe5;    /* text on the classes band */
  --focus: #1f4f8a;      /* keyboard focus ring */

  /* Fonts (no downloads: these are already on people's devices) */
  --font-serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  /* Spacing */
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  --section-space: clamp(3.5rem, 8vw, 7rem);
}

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

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.65;
}

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

h1,
h2,
h3 {
  font-family: var(--font-serif);
  font-weight: 400;
  line-height: 1.12;
  letter-spacing: -0.01em;
  margin: 0 0 1rem;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.35rem, 1.5rem + 3.6vw, 4.3rem);
}

h2 {
  font-size: clamp(1.9rem, 1.35rem + 2.2vw, 3rem);
}

h3 {
  font-size: clamp(1.4rem, 1.2rem + 0.8vw, 1.75rem);
}

p {
  margin: 0 0 1rem;
  text-wrap: pretty;
}

a {
  color: var(--clay);
  text-underline-offset: 0.18em;
  text-decoration-thickness: 1px;
}

a:hover {
  text-decoration-thickness: 2px;
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 4px;
}

section[id] {
  scroll-margin-top: 1rem;
}

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

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

.section {
  padding-block: var(--section-space);
}

/* Speckled background, like the glaze */
.speckled {
  background-color: var(--cream);
  background-image:
    radial-gradient(circle, rgb(110 75 50 / 0.22) 0.9px, transparent 1.4px),
    radial-gradient(circle, rgb(110 75 50 / 0.14) 0.7px, transparent 1.2px),
    radial-gradient(circle, rgb(110 75 50 / 0.18) 1.1px, transparent 1.7px);
  background-size: 37px 41px, 23px 29px, 53px 47px;
  background-position: 0 0, 11px 17px, 29px 7px;
}

/* ---------- Skip link ---------- */
.skip-link {
  position: fixed;
  left: 1rem;
  top: -4rem;
  z-index: 10;
  padding: 0.6rem 1rem;
  background: var(--ink);
  color: var(--paper);
  border-radius: 6px;
}

.skip-link:focus {
  top: 1rem;
}

/* ---------- Buttons ---------- */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0.7rem 1.4rem;
  border: 2px solid var(--clay);
  border-radius: 999px;
  font-weight: 600;
  font-size: 1rem;
  line-height: 1.25;
  text-align: center;
  text-decoration: none;
}

@media (prefers-reduced-motion: no-preference) {
  .button {
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
  }
}

.button-primary {
  background: var(--clay);
  color: #fff;
}

.button-primary:hover {
  background: var(--clay-dark);
  border-color: var(--clay-dark);
}

.button-secondary {
  background: transparent;
  color: var(--clay-dark);
}

.button-secondary:hover {
  background: rgb(154 79 44 / 0.1);
}

.button-light {
  background: var(--on-dark);
  border-color: var(--on-dark);
  color: var(--clay-dark);
}

.button-light:hover {
  background: #fff;
  border-color: #fff;
}

/* ---------- Header ---------- */
.site-header {
  background: var(--cream);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 2rem;
  flex-wrap: wrap;
  padding-block: 1rem;
}

.wordmark {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
}

.nav-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.75rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav-list a {
  display: inline-block;
  padding-block: 0.5rem;
  color: var(--ink);
  font-weight: 500;
  text-decoration: none;
}

.nav-list a:hover {
  color: var(--clay);
  text-decoration: underline;
}

/* ---------- Intro ---------- */
.hero {
  padding-block: clamp(2.5rem, 6vw, 5.5rem);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  align-items: center;
  gap: clamp(2rem, 5vw, 4.5rem);
}

.lead {
  font-size: clamp(1.1rem, 1rem + 0.35vw, 1.25rem);
  color: var(--muted);
  max-width: 34em;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-block: 1.75rem 1.25rem;
}

.hero-note {
  font-size: 0.95rem;
  color: var(--muted);
  padding-left: 0.9rem;
  border-left: 3px solid var(--clay);
  margin: 0;
}

.hero-photo {
  margin: 0;
  justify-self: end;
  width: 100%;
  max-width: 466px; /* the photo's real width, so it stays sharp */
}

.hero-photo img {
  width: 100%;
  border-radius: 50% 50% 14px 14px / 34% 34% 14px 14px;
  box-shadow: 0 1.5rem 3rem -1.5rem rgb(80 45 25 / 0.45);
}

/* ---------- Pieces ---------- */
.pieces-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  align-items: center;
  gap: clamp(2rem, 6vw, 5rem);
}

.mug-photo {
  margin: 0;
  width: 100%;
  max-width: 369px; /* the photo's real width */
  justify-self: center;
}

.mug-photo img {
  width: 100%;
  border-radius: 18px;
}

.mug-photo figcaption {
  margin-top: 0.75rem;
  font-size: 0.9rem;
  color: var(--muted);
}

.label {
  margin: 1.75rem 0;
  padding: 0.4rem 1.25rem;
  border: 1.5px solid var(--ink);
  border-radius: 10px;
  background: #fffdf9;
  max-width: 32rem;
}

.label > div {
  display: grid;
  grid-template-columns: 6.5rem minmax(0, 1fr);
  gap: 1rem;
  padding-block: 0.75rem;
  border-top: 1px dashed var(--line);
}

.label > div:first-child {
  border-top: 0;
}

.label dt {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--clay);
  padding-top: 0.2rem;
}

.label dd {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 1.15rem;
  line-height: 1.4;
}

.aside {
  color: var(--muted);
}

/* ---------- Classes ---------- */
.classes {
  background: var(--clay-dark);
  color: var(--on-dark);
  --focus: #ffd59e;
}

.classes .eyebrow {
  color: #f0c49c;
}

.classes-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(2rem, 6vw, 5rem);
  align-items: start;
}

.classes-time {
  font-family: var(--font-serif);
  font-size: clamp(1.6rem, 1.25rem + 1.6vw, 2.4rem);
  line-height: 1.2;
  margin-block: 1.5rem;
}

.classes-time span {
  display: block;
}

.classes-time span + span {
  color: #f0c49c;
}

.facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  margin: 0 0 1.75rem;
  border-top: 1px solid rgb(247 239 229 / 0.3);
}

.facts > div {
  padding: 1rem 1rem 1rem 0;
  border-bottom: 1px solid rgb(247 239 229 / 0.3);
}

.facts dt {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #f0c49c;
}

.facts dd {
  margin: 0.2rem 0 0;
  font-family: var(--font-serif);
  font-size: 1.2rem;
  line-height: 1.35;
}

.open-studio {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 0.5rem clamp(2rem, 6vw, 5rem);
  align-items: baseline;
  margin-top: clamp(3rem, 6vw, 4.5rem);
  padding-top: 2rem;
  border-top: 1px solid rgb(247 239 229 / 0.3);
}

.open-studio h3 {
  margin: 0;
}

.open-studio p {
  margin: 0;
}

/* ---------- About ---------- */
.about-inner {
  max-width: 44rem;
  text-align: center;
}

.about-text {
  font-family: var(--font-serif);
  font-size: clamp(1.2rem, 1.05rem + 0.6vw, 1.5rem);
  line-height: 1.55;
  color: var(--ink);
}

/* ---------- Contact ---------- */
.contact {
  border-top: 1px solid var(--line);
}

.contact-inner {
  max-width: 44rem;
  text-align: center;
}

.contact-email {
  font-family: var(--font-serif);
  font-size: clamp(1.1rem, 0.3rem + 4.4vw, 2.6rem);
  line-height: 1.2;
  margin-block: 1.5rem 2rem;
  overflow-wrap: anywhere;
}

.contact-email a {
  color: var(--clay-dark);
}

.contact-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem 2.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.contact-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--clay);
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--ink);
  color: var(--paper);
  font-size: 0.95rem;
  --focus: #ffd59e;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem 2rem;
  padding-block: 1.5rem;
}

.footer-inner p {
  margin: 0;
}

.site-footer a {
  color: var(--paper);
  display: inline-block;
  padding-block: 0.4rem;
}

/* ---------- Tablet and phone ---------- */
@media (max-width: 52rem) {
  .hero-grid,
  .pieces-grid,
  .classes-grid,
  .open-studio {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero-photo {
    justify-self: center;
  }

  /* On a phone, show the text before the mug photo */
  .pieces-text {
    order: -1;
  }
}

@media (max-width: 34rem) {
  body {
    font-size: 1rem;
  }

  .header-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.15rem;
    padding-block: 0.75rem 0.25rem;
  }

  .wordmark {
    font-size: 1.35rem;
  }

  .hero {
    padding-top: 2rem;
  }

  h1 {
    font-size: clamp(2.1rem, 1.2rem + 4.4vw, 2.6rem);
  }

  .nav-list {
    gap: 0 1.25rem;
  }

  .actions {
    flex-direction: column;
  }

  .actions .button,
  .pieces-text .button,
  .classes-detail .button {
    width: 100%;
  }

  .label {
    padding-inline: 1rem;
  }

  .label > div {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.15rem;
  }

  .facts {
    grid-template-columns: minmax(0, 1fr);
  }

  .about-inner,
  .contact-inner {
    text-align: left;
  }

  .contact-list {
    justify-content: flex-start;
  }
}
