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

html {
  /* Explicit px — consistent across browsers (Chrome, Safari, etc.) */
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--ticker-height) + var(--header-height));
}

body {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  font-weight: 400;
  line-height: 1.6;
  color: var(--color-teal);
  background-color: var(--color-cream);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body.menu-open {
  overflow: hidden;
}

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

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

ul {
  list-style: none;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

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

.section-heading {
  font-family: var(--font-serif);
  font-style: normal;
  font-weight: 400;
  font-size: var(--text-section-heading);
  line-height: 1.1;
  color: var(--color-teal);
  letter-spacing: -0.02em;
  text-transform: uppercase;
}

/* Anchor scroll targets align below sticky header */
section[id] {
  scroll-margin-top: calc(var(--ticker-height) + var(--header-height) + 12px);
}

.subheading,
.section-subheading {
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  line-height: 1.65;
  color: var(--color-teal);
  margin-top: var(--space-md);
  text-wrap: pretty;
}

/* Tier A — section intro subheadings (gelato, cakes, gelato cart, contact) */
.gelato__panel-inner .subheading,
.cakes__content .subheading,
.gelato-cart__content .subheading,
.visit__contact-inner .subheading {
  width: 100%;
  max-width: min(var(--copy-measure-intro), 100%);
  margin-inline: auto;
  box-sizing: border-box;
}

/* Product / menu labels */
.item-name {
  font-family: var(--font-sans);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-teal);
  margin-bottom: 0.25rem;
}

.item-detail {
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  font-weight: 400;
  letter-spacing: 0.04em;
  line-height: 1.55;
  text-transform: none;
  color: var(--color-teal);
  opacity: 0.9;
}

.body-copy {
  font-size: var(--text-sm);
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1.7;
  color: var(--color-teal);
}

.body-copy--normal {
  text-transform: none;
  letter-spacing: 0.02em;
  font-size: var(--text-base);
  line-height: 1.75;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.875rem 2rem;
  font-family: var(--font-sans);
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  border: 1.5px solid var(--color-teal);
  color: var(--color-teal);
  background: transparent;
  transition:
    background var(--duration-fast) var(--ease-out),
    color var(--duration-fast) var(--ease-out),
    border-color var(--duration-fast) var(--ease-out);
}

.btn:hover,
.btn:focus-visible {
  background: var(--color-teal);
  color: var(--color-cream);
  border-color: var(--color-teal);
}

.btn--white {
  border-color: var(--color-white);
  background: var(--color-white);
  color: var(--color-teal);
}

.btn--white:hover,
.btn--white:focus-visible {
  background: var(--color-teal);
  color: var(--color-white);
  border-color: var(--color-teal);
}

.btn--ghost-white {
  border-color: var(--color-white);
  background: transparent;
  color: var(--color-white);
}

.btn--ghost-white:hover,
.btn--ghost-white:focus-visible {
  background: var(--color-white);
  color: var(--color-teal-dark);
  border-color: var(--color-white);
}

.btn--filled {
  background: var(--color-teal);
  color: var(--color-cream);
}

.btn--filled:hover,
.btn--filled:focus-visible {
  background: var(--color-teal-dark);
  border-color: var(--color-teal-dark);
  color: var(--color-cream);
}

.text-link {
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-teal);
  text-decoration: underline;
  text-underline-offset: 4px;
  transition: opacity var(--duration-fast);
}

.text-link:hover {
  opacity: 0.7;
}

.divider-line {
  width: 56px;
  height: 2px;
  background: var(--color-teal);
  margin-block: var(--space-md);
}

/* Horizontal rule between page sections */
.section-divider {
  width: 100%;
  height: 1px;
  background: var(--color-teal);
  border: none;
  margin: 0;
}

main > section {
  border-top: 1px solid var(--color-teal);
}

main > section.hero,
main > .landing {
  border-top: none;
}

main > .landing + section {
  border-top: 1px solid var(--color-teal);
}

main > section.gallery-section {
  border-top: none;
}

main > section.gallery-section + section {
  border-top: none;
}

/* Scroll reveal */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition:
    opacity var(--duration-slow) var(--ease-out),
    transform var(--duration-slow) var(--ease-out);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
