/*
  Holly's Bakery: site stylesheet

  CONCEPT: bold, cheerful and a little cheeky, like a pink bakery window on a sunny Saturday.

  PALETTE (contrast checked for WCAG AA)
  --cream   #FFF7F3  page background        plum text on cream 14.1:1
  --blush   #FFE6F0  cards, photo tint       plum text on blush 12.7:1
  --pink    #FF8FC0  bold bands              plum text on pink 7.1:1
  --plum    #4A0E35  all body text, footer   cream on plum 14.1:1
  --action  #6B1E4F  buttons and quotes      cream on action 10.3:1 (hover: plum)
  --hot     #E0457B  decoration only (icing swirls, sprinkles). Never used for text.

  TYPE PAIRING
  Fraunces 600 (and italic 600) for headings: soft, a little wonky, friendly.
  Nunito 400 and 700 for body and buttons: rounded and easy to read on a phone.

  RECURRING MOTIF
  Piped icing swirls (hero, photo tints, sign-off) and a strip of round sprinkle dots
  along the top of the sign-off band and the footer.
*/

:root {
  --cream: #FFF7F3;
  --blush: #FFE6F0;
  --pink: #FF8FC0;
  --hot: #E0457B;
  --plum: #4A0E35;
  --action: #6B1E4F;
  --focus: #4A0E35;

  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Nunito", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;

  --s1: 8px;
  --s2: 16px;
  --s3: 24px;
  --s4: 32px;
  --s5: 40px;
  --s6: 48px;
  --s8: 64px;
  --s10: 80px;
  --s12: 96px;

  --gutter: clamp(16px, 4vw, 40px);
  --radius: 16px;
  --radius-sm: 12px;
  --measure: 65ch;

  --fs-body: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  --fs-h1: clamp(2.5rem, 1.5rem + 4.5vw, 4.75rem);
  --fs-h2: clamp(2rem, 1.4rem + 2.4vw, 3.25rem);
  --fs-h3: clamp(1.3rem, 1.1rem + 0.8vw, 1.75rem);
  --fs-small: 0.9375rem;
}

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

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

body {
  margin: 0;
  background: var(--cream);
  color: var(--plum);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  font-weight: 400;
  line-height: 1.6;
  overflow-wrap: break-word;
}

img,
svg {
  display: block;
  max-width: 100%;
}

img {
  height: auto;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.01em;
  margin: 0 0 var(--s2);
}

h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); line-height: 1.2; }

h1 em {
  font-style: italic;
  color: var(--action);
}

p {
  margin: 0 0 var(--s2);
}

.lead {
  font-size: clamp(1.125rem, 1rem + 0.5vw, 1.375rem);
  max-width: var(--measure);
}

a {
  color: var(--plum);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.2em;
}

a:hover {
  color: var(--action);
}

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

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  left: var(--s2);
  top: -100px;
  z-index: 10;
  background: var(--plum);
  color: var(--cream);
  padding: var(--s1) var(--s2);
  border-radius: var(--radius-sm);
  font-weight: 700;
}

.skip-link:focus {
  top: var(--s2);
}

.container {
  width: min(1120px, 100% - 2 * var(--gutter));
  margin-inline: auto;
}

.section {
  padding: var(--s10) 0;
}

/* Motif: sprinkle dots along an edge */
.sprinkled {
  position: relative;
}

.sprinkled::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 24px;
  background-image:
    radial-gradient(circle, var(--hot) 0 3px, transparent 3.5px),
    radial-gradient(circle, var(--plum) 0 2px, transparent 2.5px);
  background-size: 32px 24px, 20px 24px;
  background-position: 4px 6px, 14px 14px;
  pointer-events: none;
}

.swirl {
  color: var(--hot);
  width: clamp(88px, 12vw, 136px);
  height: auto;
}

/* Header */
.site-header {
  padding: var(--s3) 0;
  border-bottom: 2px solid var(--blush);
}

.site-header .container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--s2);
}

.wordmark {
  font-family: var(--font-display);
  font-size: 1.625rem;
  font-weight: 600;
  line-height: 1;
  color: var(--plum);
  text-decoration: none;
}

.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: var(--s1) var(--s3);
}

.site-nav a {
  display: inline-block;
  padding: var(--s1) 0;
  font-weight: 700;
  text-decoration: none;
  border-bottom: 3px solid transparent;
}

.site-nav a:hover {
  border-bottom-color: var(--hot);
}

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

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: var(--s2) var(--s4);
  border: 0;
  border-radius: var(--radius-sm);
  background: var(--action);
  color: var(--cream);
  font: inherit;
  font-weight: 700;
  font-size: 1.0625rem;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, transform 0.1s ease;
}

.btn:hover {
  background: var(--plum);
  color: var(--cream);
}

.btn:active {
  transform: translateY(1px);
}

.btn:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.btn-ghost {
  background: transparent;
  color: var(--plum);
  box-shadow: inset 0 0 0 2px var(--plum);
}

.btn-ghost:hover {
  background: var(--plum);
  color: var(--cream);
}

.text-link {
  font-weight: 700;
  color: var(--plum);
  text-decoration: underline;
  text-decoration-color: var(--hot);
  text-decoration-thickness: 3px;
  text-underline-offset: 0.25em;
}

.text-link:hover {
  color: var(--action);
  text-decoration-color: var(--action);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s2);
  margin-top: var(--s4);
}

/* Photo slots: a designed placeholder until the owner adds a picture */
.photo {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  margin: 0;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius);
  background: var(--blush);
  display: grid;
  place-items: center;
}

.photo-swirl {
  position: absolute;
  width: 42%;
  max-width: 180px;
  height: auto;
  color: var(--hot);
  opacity: 0.5;
  top: 40%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.photo-note {
  position: relative;
  max-width: 26ch;
  padding: var(--s2);
  text-align: center;
  font-weight: 700;
  color: var(--plum);
  background: var(--cream);
  border-radius: var(--radius-sm);
}

[data-photo-slot] > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

[data-photo-slot]:has(> img) > :not(img) {
  display: none;
}

/* Home: hero */
.hero {
  padding: var(--s6) 0 var(--s10);
}

.hero .container {
  display: grid;
  gap: var(--s6);
  align-items: center;
}

.hero-media {
  position: relative;
  isolation: isolate;
}

.hero-media::before {
  content: "";
  position: absolute;
  inset: var(--s2) calc(-1 * var(--s1)) calc(-1 * var(--s1)) var(--s2);
  background: var(--pink);
  border-radius: var(--radius);
  z-index: -1;
}

.hero-media .photo {
  aspect-ratio: 4 / 3;
}

.hero .swirl {
  margin-bottom: var(--s3);
}

@media (min-width: 860px) {
  .hero {
    padding: var(--s10) 0 var(--s12);
  }

  .hero .container {
    grid-template-columns: 1fr 1fr;
    gap: var(--s8);
  }

  .hero-media .photo {
    aspect-ratio: 4 / 5;
  }
}

/* Home: one colour statement */
.statement .container {
  display: grid;
  gap: var(--s4);
}

.statement h2 {
  max-width: 14ch;
  margin: 0;
}

.statement p {
  max-width: var(--measure);
  margin: 0;
}

@media (min-width: 860px) {
  .statement .container {
    grid-template-columns: 1.1fr 0.9fr;
    align-items: end;
    gap: var(--s8);
  }
}

/* Cake cards */
.cake-grid,
.signature-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: var(--s4);
}

.cake-card {
  height: 100%;
  display: flex;
  flex-direction: column;
  padding: var(--s3);
  background: var(--blush);
  border-radius: var(--radius);
}

.cake-card .photo {
  margin-bottom: var(--s3);
}

.cake-card h2,
.cake-card h3 {
  font-size: var(--fs-h3);
  line-height: 1.2;
  margin-bottom: var(--s1);
}

.cake-card p {
  max-width: var(--measure);
}

.price {
  font-weight: 700;
  margin-bottom: var(--s2) !important;
}

.cake-card .text-link {
  margin-top: auto;
  align-self: flex-start;
}

.signature-grid {
  gap: var(--s4);
}

@media (min-width: 800px) {
  .signature-grid {
    grid-template-columns: repeat(3, 1fr);
    align-items: start;
  }

  .signature-grid li:nth-child(2) {
    margin-top: var(--s10);
  }
}

.signature-more {
  margin-top: var(--s6);
}

/* Cakes page */
.page-intro {
  padding: var(--s8) 0 var(--s6);
}

.page-intro p {
  max-width: var(--measure);
}

.cake-grid {
  margin-bottom: var(--s10);
}

@media (min-width: 800px) {
  .cake-grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--s6);
  }
}

/* Sign-off band */
.signoff {
  background: var(--pink);
  color: var(--plum);
  padding: var(--s10) 0;
}

.signoff .container {
  display: grid;
  gap: var(--s4);
  align-items: center;
}

.signoff h2 {
  margin: 0;
  max-width: 16ch;
}

.signoff p {
  margin: 0;
  max-width: var(--measure);
}

@media (min-width: 800px) {
  .signoff .container {
    grid-template-columns: 1.4fr 1fr;
    gap: var(--s8);
  }
}

/* About */
.about-split {
  display: grid;
  gap: var(--s6);
}

.about-split .prose p {
  max-width: var(--measure);
}

.quote {
  font-family: var(--font-display);
  font-style: italic;
  font-size: var(--fs-h2);
  line-height: 1.2;
  color: var(--action);
  max-width: 20ch;
  margin: var(--s8) 0;
  padding-left: var(--s3);
  border-left: 6px solid var(--hot);
}

@media (min-width: 860px) {
  .about-split {
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: var(--s8);
  }
}

/* Contact */
.contact-layout {
  display: grid;
  gap: var(--s8);
}

.details dt {
  font-weight: 700;
  margin-top: var(--s3);
}

.details dt:first-child {
  margin-top: 0;
}

.details dd {
  margin: 0;
}

.enquiry-form {
  display: grid;
  gap: var(--s3);
}

.field {
  display: grid;
  gap: var(--s1);
}

.field label {
  font-weight: 700;
}

.hint {
  font-size: var(--fs-small);
  margin: 0;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 52px;
  padding: var(--s2);
  font: inherit;
  color: var(--plum);
  background: #fff;
  border: 2px solid var(--plum);
  border-radius: var(--radius-sm);
}

.field textarea {
  min-height: 168px;
  resize: vertical;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.notice {
  margin: 0;
  padding: var(--s3);
  background: var(--blush);
  border-left: 6px solid var(--action);
  border-radius: var(--radius-sm);
  max-width: var(--measure);
}

.notice[hidden] {
  display: none;
}

@media (min-width: 860px) {
  .contact-layout {
    grid-template-columns: 0.8fr 1.2fr;
    gap: var(--s8);
  }
}

/* Footer */
.site-footer {
  margin-top: var(--s10);
  padding: var(--s10) 0 var(--s4);
  background: var(--plum);
  color: var(--cream);
}

.site-footer a {
  color: var(--pink);
}

.site-footer a:hover {
  color: var(--cream);
}

.site-footer :focus-visible {
  outline-color: var(--pink);
}

.site-footer .wordmark {
  color: var(--cream);
}

.footer-grid {
  display: grid;
  gap: var(--s6);
}

.footer-grid h2 {
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: var(--s1);
  color: var(--pink);
}

.footer-grid p {
  margin: 0;
}

.footer-grid ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-grid li + li {
  margin-top: var(--s1);
}

.footer-base {
  margin-top: var(--s6);
  padding-top: var(--s3);
  border-top: 1px solid rgba(255, 247, 243, 0.25);
  font-size: var(--fs-small);
}

.footer-base p {
  margin: 0;
}

@media (min-width: 760px) {
  .footer-grid {
    grid-template-columns: 1.4fr 1fr 1fr;
  }
}

/* Motion: nothing essential moves, but keep it calm */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition: none !important;
    animation: none !important;
  }
}
