/* Gelateria del Poggio — parchment, terracotta, olive */

:root {
  --parchment: #f3e8d2;
  --cream: #fbf5e6;
  --sand: #ead9b8;
  --terracotta: #b5532f;
  --terracotta-deep: #8a3b20;
  --olive: #6b7340;
  --olive-deep: #3f4526;
  --ink: #3a2a1e;
  --ink-soft: #5e4a3a;
  --rule: rgba(138, 59, 32, .28);

  --display: "Playfair Display", "Hoefler Text", "Baskerville", Georgia, serif;
  --body: "EB Garamond", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --caps: "Cinzel", "Trajan Pro", "Optima", Georgia, serif;

  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .35 0 0 0 0 .22 0 0 0 0 .12 0 0 0 .09 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

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

html { scroll-behavior: smooth; scroll-padding-top: 5rem; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--body);
  font-size: clamp(1.1rem, 1.02rem + .35vw, 1.28rem);
  line-height: 1.6;
  color: var(--ink);
  background: var(--parchment) var(--grain);
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; }
p { margin: 0 0 1em; }
h1, h2, h3 { font-family: var(--display); font-weight: 500; line-height: 1.12; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(2.5rem, 1.5rem + 4.4vw, 4.6rem); letter-spacing: -.01em; }
h2 { font-size: clamp(1.9rem, 1.3rem + 2.4vw, 3rem); }
h1 em, h2 em { font-style: italic; color: var(--terracotta); }

.wrap { width: min(100% - 2.5rem, 70rem); margin-inline: auto; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap;
}

.skip {
  position: absolute; left: 1rem; top: -4rem; z-index: 20;
  background: var(--ink); color: var(--cream); padding: .5rem 1rem; border-radius: 2px;
}
.skip:focus { top: 1rem; }

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

.eyebrow, .label {
  font-family: var(--caps);
  font-size: .72rem;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--olive);
}
.eyebrow { margin-bottom: 1.1rem; }

.sprig { width: 10rem; height: 1.5rem; color: var(--olive); margin: 1.2rem 0 1.5rem; }

/* Buttons & links */
.btn {
  display: inline-block;
  font-family: var(--caps);
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .2em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  color: var(--cream);
  background: var(--terracotta);
  padding: 1.05rem 1.9rem;
  border: 1px solid var(--terracotta-deep);
  border-radius: 2px;
  box-shadow: inset 0 0 0 3px var(--terracotta), inset 0 0 0 4px rgba(251, 245, 230, .55);
  transition: background-color .2s ease, transform .2s ease;
}
.btn:hover { background: var(--terracotta-deep); transform: translateY(-1px); }
.btn-small { padding: .7rem 1.2rem; font-size: .7rem; }
.btn-light {
  background: var(--cream); color: var(--terracotta-deep); border-color: var(--cream);
  box-shadow: inset 0 0 0 3px var(--cream), inset 0 0 0 4px rgba(138, 59, 32, .4);
}
.btn-light:hover { background: #fff; }

.link-arrow {
  font-style: italic;
  text-decoration: underline;
  text-decoration-color: var(--rule);
  text-underline-offset: .3em;
  transition: text-decoration-color .2s ease;
}
.link-arrow::after { content: " \2192"; }
.link-arrow:hover { text-decoration-color: var(--terracotta); }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: rgba(243, 232, 210, .92);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--rule);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; padding-block: .8rem; }

.brand { display: inline-flex; flex-direction: column; line-height: 1; text-decoration: none; }
.brand-small { font-family: var(--caps); font-size: .62rem; letter-spacing: .34em; text-transform: uppercase; color: var(--olive); }
.brand-name { font-family: var(--display); font-style: italic; font-size: 1.55rem; color: var(--terracotta-deep); margin-top: .2rem; }

.nav { display: flex; gap: 2.2rem; }
.nav a {
  font-family: var(--caps); font-size: .74rem; letter-spacing: .2em; text-transform: uppercase;
  text-decoration: none; padding-block: .4rem; border-bottom: 1px solid transparent;
  transition: color .2s ease, border-color .2s ease;
}
.nav a:hover { color: var(--terracotta); border-color: var(--terracotta); }

/* Hero */
.hero { padding-block: clamp(2.5rem, 6vw, 5.5rem) clamp(3.5rem, 7vw, 6rem); overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; align-items: center; gap: clamp(2rem, 5vw, 5rem); }
.lede { font-size: 1.15em; color: var(--ink-soft); max-width: 32rem; margin-top: 1.5rem; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1.2rem 1.8rem; margin-top: 2.2rem; }

.hero-notes {
  display: flex; flex-wrap: wrap; gap: .4rem 0;
  list-style: none; padding: 1.4rem 0 0; margin: 2.6rem 0 0;
  border-top: 1px solid var(--rule);
  font-style: italic; color: var(--ink-soft);
}
.hero-notes li + li::before { content: "\2766"; color: var(--terracotta); font-style: normal; margin-inline: .9rem; font-size: .8em; }

.hero-art { position: relative; max-width: 26rem; width: 100%; justify-self: center; }
.hero-art > svg { width: 100%; height: auto; }
.stamp { position: absolute; left: -1.5rem; bottom: 3.2rem; width: clamp(5.5rem, 12vw, 7.5rem); transform: rotate(-12deg); filter: drop-shadow(0 4px 8px rgba(58, 42, 30, .22)); }

/* Story */
.story { background: var(--cream) var(--grain); border-block: 1px solid var(--rule); padding-block: clamp(3.5rem, 8vw, 6.5rem); }
.story-grid { display: grid; grid-template-columns: .8fr 1.2fr; align-items: center; gap: clamp(2rem, 6vw, 5.5rem); }
.story-card { max-width: 21rem; width: 100%; justify-self: center; transform: rotate(-2deg); filter: drop-shadow(0 10px 18px rgba(58, 42, 30, .16)); }
.story-copy p { color: var(--ink-soft); max-width: 36rem; }
.dropcap::first-letter {
  font-family: var(--display); float: left; font-size: 3.6em; line-height: .82;
  padding: .08em .1em 0 0; color: var(--terracotta);
}
.story-copy .signature { font-family: var(--display); font-style: italic; font-size: 1.35em; color: var(--terracotta-deep); margin: 1.6rem 0 0; }

/* Flavors */
.flavors { padding-block: clamp(3.5rem, 8vw, 6.5rem); }
.section-head { text-align: center; max-width: 38rem; margin: 0 auto clamp(2rem, 5vw, 3.5rem); }
.section-head .sprig { margin-inline: auto; }
.section-head p:last-child { color: var(--ink-soft); margin: 0; }

.flavor-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.flavor {
  position: relative;
  text-align: center;
  background: var(--cream);
  border: 1px solid var(--rule);
  border-radius: 2px;
  padding: 2rem 1.6rem 1.8rem;
  box-shadow: inset 0 0 0 5px var(--cream), inset 0 0 0 6px rgba(107, 115, 64, .3);
  transition: transform .25s ease, box-shadow .25s ease;
}
.flavor:hover { transform: translateY(-4px); box-shadow: inset 0 0 0 5px var(--cream), inset 0 0 0 6px rgba(107, 115, 64, .3), 0 14px 24px -14px rgba(58, 42, 30, .4); }
.coppa { width: 6.5rem; height: 6.5rem; margin: 0 auto .8rem; }
.flavor h3 { font-size: 1.55rem; color: var(--terracotta-deep); }
.flavor-it { font-family: var(--caps); font-size: .66rem; letter-spacing: .22em; text-transform: uppercase; color: var(--olive); margin: .5rem 0 .9rem; }
.flavor p:last-child { margin: 0; color: var(--ink-soft); font-size: .96em; line-height: 1.5; }

.flavor-note { text-align: center; font-style: italic; color: var(--ink-soft); margin: clamp(2rem, 4vw, 3rem) 0 0; }

/* Visit */
.visit { background: var(--sand) var(--grain); border-block: 1px solid var(--rule); padding-block: clamp(3.5rem, 8vw, 6.5rem); }
.visit-grid { display: grid; grid-template-columns: 1.1fr .9fr; align-items: center; gap: clamp(2rem, 6vw, 5rem); }
.visit-copy > p { color: var(--ink-soft); max-width: 32rem; }
.visit address, .visit .contact { font-style: normal; color: var(--ink); margin: 1.6rem 0 0; }
.visit .contact { margin-bottom: 2.2rem; }
.label { display: block; margin-bottom: .35rem; }
.contact a { text-decoration-color: var(--rule); text-underline-offset: .25em; overflow-wrap: anywhere; }
.contact a:hover { text-decoration-color: var(--terracotta); }

.hours-card {
  background: var(--cream);
  border: 1px solid var(--terracotta-deep);
  border-radius: 12rem 12rem 2px 2px;
  padding: clamp(3.5rem, 7vw, 5rem) clamp(1.5rem, 4vw, 2.6rem) 2.2rem;
  box-shadow: inset 0 0 0 7px var(--cream), inset 0 0 0 8px var(--rule), 0 18px 30px -22px rgba(58, 42, 30, .55);
  text-align: center;
}
.hours-card h3 { font-style: italic; font-size: 1.8rem; color: var(--terracotta-deep); margin-bottom: 1.4rem; }
.hours { width: 100%; border-collapse: collapse; text-align: left; }
.hours th, .hours td { padding: .7rem 0; border-bottom: 1px dotted var(--rule); font-weight: 400; vertical-align: baseline; }
.hours td { text-align: right; white-space: nowrap; color: var(--olive-deep); padding-left: 1rem; }
.hours tr:last-child th, .hours tr:last-child td { border-bottom: 0; }
.hours-note { font-style: italic; font-size: .95em; color: var(--ink-soft); margin: 1.4rem 0 0; }

/* CTA */
.cta { background: var(--terracotta) var(--grain); color: var(--cream); text-align: center; padding-block: clamp(3.5rem, 8vw, 6rem); }
.cta-inner { max-width: 40rem; }
.cta .eyebrow { color: #f3d9b0; }
.cta p:not(.eyebrow) { font-size: 1.1em; margin: 1.2rem auto 2.2rem; max-width: 32rem; color: #fbead3; }

/* Footer */
.site-footer { background: var(--olive-deep); color: #e3dcc0; text-align: center; padding-block: 3rem 2.4rem; }
.footer-inner > * { margin: 0; }
.brand-footer { align-items: center; }
.brand-footer .brand-small { color: #b9bd86; }
.brand-footer .brand-name { color: var(--cream); font-size: 1.8rem; }
.footer-line { font-family: var(--caps); font-size: .7rem; letter-spacing: .22em; text-transform: uppercase; margin-top: 1.3rem; }
.footer-small { font-style: italic; font-size: .92em; opacity: .75; margin-top: .7rem; }

/* Responsive */
@media (max-width: 56rem) {
  .hero-grid, .story-grid, .visit-grid { grid-template-columns: 1fr; }
  .hero-copy { text-align: center; }
  .lede { margin-inline: auto; }
  .hero-actions, .hero-notes { justify-content: center; }
  .hero-art { max-width: 20rem; }
  .stamp { left: -.75rem; }
  .story-card { max-width: 16rem; }
  .flavor-grid { grid-template-columns: repeat(2, 1fr); }
  .hours-card { max-width: 26rem; width: 100%; justify-self: center; }
}

@media (max-width: 40rem) {
  .nav { display: none; }
  .flavor-grid { grid-template-columns: 1fr; max-width: 24rem; margin-inline: auto; }
  .hero-notes { flex-direction: column; align-items: center; }
  .hero-notes li + li::before { content: none; }
  .hero-actions .btn { width: 100%; text-align: center; }
}

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