/* Magnolia Soap — base styles */

:root {
  --cream: #FAF6F0;
  --ivory: #FFFDF9;
  --blush: #EBC9CC;
  --lavender: #D8CEE9;
  --sage: #A8B9A2;
  --ink: #403D38;
  --gold: #B99662;

  --font-body: "Nunito", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-accent: "Caveat", "Segoe Script", cursive;

  --radius: 1.25rem;
  --shadow-soft: 0 10px 30px -12px rgba(64, 61, 56, 0.18);
  --container: 72rem;
}

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

html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

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

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

a { color: inherit; }

h1, h2, h3 {
  font-family: var(--font-body);
  font-weight: 800;
  line-height: 1.2;
  margin: 0 0 0.5em;
}

h1 { font-size: clamp(2.1rem, 5vw, 3.2rem); }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.2rem); }
h3 { font-size: 1.25rem; }

p { margin: 0 0 1em; }

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 1.25rem;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -3rem;
  background: var(--ink);
  color: var(--ivory);
  padding: 0.6em 1em;
  border-radius: 0.5em;
  transition: top 0.2s ease;
  z-index: 100;
}
.skip-link:focus { top: 1rem; }

a:focus-visible,
button:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
}

.kicker {
  font-family: var(--font-accent);
  font-size: 1.5rem;
  color: #A34A63;
  display: block;
  margin-bottom: 0.15em;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(250, 246, 240, 0.92);
  backdrop-filter: saturate(160%) blur(6px);
  border-bottom: 1px solid rgba(64, 61, 56, 0.08);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 0.75rem;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: var(--ink);
}

.brand img {
  width: 44px;
  height: 44px;
  object-fit: contain;
  border-radius: 50%;
  background: var(--ivory);
  box-shadow: var(--shadow-soft);
}

.brand-name {
  font-family: var(--font-accent);
  font-size: 1.7rem;
  line-height: 1;
}

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

.main-nav a {
  text-decoration: none;
  font-weight: 700;
  font-size: 0.95rem;
  padding: 0.4em 0.2em;
  border-bottom: 2px solid transparent;
}

.main-nav a:hover,
.main-nav a:focus-visible {
  border-bottom-color: var(--gold);
}

/* Hero */
.hero {
  padding-block: 3.5rem 3rem;
}

.hero .container {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  align-items: center;
}

@media (min-width: 62rem) {
  .hero .container {
    grid-template-columns: 1.1fr 0.9fr;
  }
}

.hero-copy .tagline {
  font-family: var(--font-accent);
  font-size: 1.9rem;
  color: #A34A63;
  margin-bottom: 0.6em;
}

.hero-art {
  display: flex;
  justify-content: center;
}

.hero-art img {
  width: min(100%, 22rem);
  border-radius: 50%;
  box-shadow: var(--shadow-soft);
  border: 6px solid var(--ivory);
}

.button {
  display: inline-block;
  background: var(--ink);
  color: var(--ivory);
  text-decoration: none;
  font-weight: 700;
  padding: 0.85em 1.6em;
  border-radius: 999px;
  box-shadow: var(--shadow-soft);
  transition: transform 0.15s ease, background 0.15s ease;
}

.button:hover,
.button:focus-visible { background: #2c2a26; transform: translateY(-2px); }

/* Sections */
.section { padding-block: 3.5rem; }
.section-alt { background: var(--ivory); }

.section-head {
  max-width: 42rem;
  margin-bottom: 2.25rem;
}

/* About */
.about-grid {
  display: grid;
  gap: 2rem;
}

@media (min-width: 55rem) {
  .about-grid { grid-template-columns: repeat(3, 1fr); }
}

.value-card {
  background: var(--cream);
  border: 1px solid rgba(64,61,56,0.08);
  border-radius: var(--radius);
  padding: 1.5rem;
}

.section-alt .value-card { background: var(--ivory); }

/* Category cards */
.card-grid {
  display: grid;
  gap: 1.75rem;
  grid-template-columns: repeat(auto-fit, minmax(15.5rem, 1fr));
}

.card {
  background: var(--ivory);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  display: flex;
  flex-direction: column;
}

.section-alt .card { background: var(--cream); }

.card figure { margin: 0; aspect-ratio: 4 / 3; overflow: hidden; background: var(--blush); }

.card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.card:hover img { transform: scale(1.04); }

.card-body { padding: 1.25rem 1.4rem 1.5rem; flex: 1; display: flex; flex-direction: column; }

.card-soon {
  align-items: center;
  justify-content: center;
  text-align: center;
  background: var(--lavender);
  color: var(--ink);
  min-height: 100%;
}

.card-soon .card-body { justify-content: center; }

.pill {
  display: inline-block;
  align-self: flex-start;
  background: var(--sage);
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  padding: 0.3em 0.75em;
  border-radius: 999px;
  margin-top: auto;
}

/* Gallery */
.gallery-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(2, 1fr);
}

@media (min-width: 40rem) {
  .gallery-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 62rem) {
  .gallery-grid { grid-template-columns: repeat(4, 1fr); }
}

.gallery-grid figure {
  margin: 0;
  border-radius: 0.9rem;
  overflow: hidden;
  aspect-ratio: 4 / 5;
  box-shadow: var(--shadow-soft);
}

.gallery-grid img { width: 100%; height: 100%; object-fit: cover; }
.gallery-grid figcaption {
  font-size: 0.8rem;
  color: var(--ink);
  opacity: 0.75;
  margin-top: 0.4rem;
}

/* Footer */
.site-footer {
  background: var(--ink);
  color: var(--ivory);
  padding-block: 2.5rem;
  font-size: 0.9rem;
}

.site-footer a { text-decoration: underline; }

.site-footer .container {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2rem;
  justify-content: space-between;
  align-items: flex-start;
}

.footer-note { opacity: 0.8; max-width: 34rem; }

.heart { color: #E58BA0; }

/* Products */
.subhead {
  font-family: var(--font-accent);
  font-size: 2rem;
  font-weight: 700;
  color: #A34A63;
  margin: 2.5rem 0 0.75rem;
}

.subhead:first-of-type { margin-top: 0; }

.variant-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0 0 1.25rem;
  padding: 0;
}

.variant-list li {
  background: var(--lavender);
  border-radius: 999px;
  padding: 0.35em 1em;
  font-weight: 700;
  font-size: 0.95rem;
}

/* Inner pages */
.narrow { max-width: 46rem; }

.page-hero { padding-block: 3.5rem 1.5rem; }
.page-hero h1 { margin-bottom: 0.4em; }
.lead { font-size: 1.2rem; max-width: 38rem; margin-bottom: 0; }

.prose p { max-width: 38rem; }
.prose h2 { margin-top: 0; }
.h3 { font-size: 1.25rem; }

.plain-list { list-style: none; margin: 0 0 1.25rem; padding: 0; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.plain-list a {
  display: inline-block;
  background: var(--lavender);
  border-radius: 999px;
  padding: 0.35em 1em;
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
}
.plain-list a:hover { background: var(--blush); }

.text-link { font-weight: 700; text-decoration-color: var(--gold); text-underline-offset: 0.25em; }

.main-nav a[aria-current="page"] { border-bottom-color: var(--gold); }

/* Contact form — minimal */
.contact-section { padding-top: 1.5rem; }

.contact-form { display: grid; gap: 1.75rem; max-width: 36rem; }

.field { display: grid; gap: 0.25rem; }

.field label { font-weight: 700; font-size: 0.85rem; letter-spacing: 0.02em; color: var(--ink); opacity: 0.8; }

.field input[type="text"],
.field input[type="email"],
.field select,
.field textarea {
  font: inherit;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-bottom: 1.5px solid rgba(64, 61, 56, 0.3);
  border-radius: 0;
  padding: 0.55em 0;
  width: 100%;
  transition: border-color 0.15s ease;
}

.field select {
  appearance: none;
  padding-right: 1.75rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9'%3E%3Cpath d='M1 1.5l6 6 6-6' fill='none' stroke='%23403D38' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.25rem center;
}

.field textarea { resize: vertical; min-height: 8rem; }

.field input:hover,
.field select:hover,
.field textarea:hover { border-bottom-color: var(--gold); }

.field input:focus-visible,
.field select:focus-visible,
.field textarea:focus-visible {
  outline: none;
  border-bottom-color: var(--gold);
  box-shadow: 0 2px 0 0 var(--gold);
}

.field-check {
  grid-template-columns: auto 1fr;
  align-items: start;
  gap: 0.75rem;
}
.field-check input { margin-top: 0.3rem; width: 1.15rem; height: 1.15rem; accent-color: var(--ink); }
.field-check input:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.field-check label { font-weight: 400; font-size: 0.9rem; opacity: 1; letter-spacing: 0; }

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

.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1.25rem; }
.contact-form .button { border: 0; font: inherit; font-weight: 700; cursor: pointer; padding-inline: 2.25rem; box-shadow: none; }
.contact-form .button[disabled] { opacity: 0.6; cursor: progress; }

.form-status { margin: 0; font-weight: 700; min-height: 1.5em; }
.form-status.is-error { color: #8A1F3A; }
.form-status.is-ok { color: #2F5A32; }

@media (max-width: 40rem) {
  .page-hero { padding-block: 2.5rem 1rem; }
  .contact-form .button { width: 100%; }
}

.subsub { font-size: 1.1rem; margin: 1.5rem 0 0.6rem; }
.subhead + .subsub { margin-top: 0.5rem; }
.gallery-grid + .subsub { margin-top: 2rem; }
