/* ---------------------------------------------------
   Sanini Wines — the diary
   Palette: parchment paper, oxblood wine, amber, vine green
--------------------------------------------------- */

:root{
  --paper: #EDE6D5;
  --paper-dim: #E3DAC5;
  --ink: #241B14;
  --ink-soft: #4A3F33;
  --wine: #641623;
  --wine-deep: #3E0E17;
  --amber: #B4802F;
  --amber-soft: #D8B876;
  --vine: #4B5A34;
  --rule: rgba(36,27,20,0.16);
  --rule-on-wine: rgba(237,230,213,0.28);

  --serif: "Fraunces", "Iowan Old Style", Georgia, serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --measure: 62ch;
}

*{ box-sizing: border-box; }
html{ scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce){
  html{ scroll-behavior: auto; }
  *{ animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

body{
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

a{ color: inherit; }

h1, h2, h3{
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.08;
  margin: 0;
  color: var(--ink);
}

p{ margin: 0 0 1.1em; }
p:last-child{ margin-bottom: 0; }

.wrap{
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 32px;
}

.col{
  max-width: var(--measure);
}

/* ---------------- Nav ---------------- */

.nav{
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(237,230,213,0.92);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s ease, box-shadow .3s ease;
}
.nav.is-scrolled{
  border-bottom-color: var(--rule);
  box-shadow: 0 6px 18px rgba(36,27,20,0.05);
}
.nav-inner{
  max-width: 1180px;
  margin: 0 auto;
  padding: 18px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-mark{
  font-family: var(--serif);
  font-size: 21px;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-decoration: none;
  color: var(--wine);
}
.nav-mark em{ font-style: italic; color: var(--ink); font-weight: 400; }
.nav-links{
  display: flex;
  gap: 30px;
  list-style: none;
  margin: 0; padding: 0;
}
.nav-links a{
  text-decoration: none;
  font-size: 14.5px;
  color: var(--ink-soft);
  position: relative;
  padding-bottom: 3px;
}
.nav-links a:hover{ color: var(--wine); }
.nav-toggle{ display: none; }

@media (max-width: 720px){
  .nav-links{ display: none; }
}

/* ---------------- Hero ---------------- */

.hero{
  position: relative;
  min-height: 92vh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  color: #F4EFE2;
}
.hero-img{
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 40%;
}
.hero::after{
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(30,15,12,0.15) 0%, rgba(30,15,12,0.10) 35%, rgba(20,10,9,0.72) 100%);
}
.hero-inner{
  position: relative;
  z-index: 2;
  padding: 0 32px 72px;
  max-width: 1180px;
  margin: 0 auto;
  width: 100%;
}
.hero-eyebrow{
  font-family: var(--serif);
  font-style: italic;
  font-size: 17px;
  color: var(--amber-soft);
  margin: 0 0 18px;
}
.hero h1{
  color: #F8F3E6;
  font-size: clamp(40px, 7vw, 84px);
  max-width: 16ch;
  letter-spacing: -0.01em;
}
.hero-sub{
  margin-top: 22px;
  font-size: 19px;
  max-width: 46ch;
  color: rgba(248,243,230,0.86);
}
.hero-meta{
  margin-top: 34px;
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
  font-size: 14px;
  color: rgba(248,243,230,0.7);
  border-top: 1px solid rgba(248,243,230,0.25);
  padding-top: 18px;
  max-width: 46ch;
}
.hero-meta strong{ display:block; color: #F8F3E6; font-family: var(--serif); font-size: 16px; font-weight: 500;}

/* ---------------- Sections generic ---------------- */

section{ padding: 108px 0; }
@media (max-width: 720px){ section{ padding: 72px 0; } }

.section-head{
  margin-bottom: 48px;
}
.section-head .kicker{
  font-family: var(--serif);
  font-style: italic;
  color: var(--wine);
  font-size: 18px;
  margin: 0 0 10px;
}
.section-head h2{
  font-size: clamp(28px, 4vw, 42px);
  max-width: 20ch;
}

.rule{
  border: none;
  border-top: 1px solid var(--rule);
  margin: 0;
}

/* ---------------- Story blocks ---------------- */

.story{
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 72px;
  align-items: start;
}
@media (max-width: 900px){
  .story{ grid-template-columns: 1fr; gap: 40px; }
}

.story p{ color: var(--ink-soft); font-size: 17.5px; }
.story .drop::first-letter{
  font-family: var(--serif);
  font-size: 3.6em;
  float: left;
  line-height: 0.85;
  padding: 0.04em 0.09em 0 0;
  color: var(--wine);
  font-weight: 600;
}

.figure{
  position: relative;
}
.figure img{
  width: 100%;
  height: auto;
}
.figure figcaption{
  margin-top: 12px;
  font-size: 13.5px;
  color: var(--ink-soft);
  font-style: italic;
  font-family: var(--serif);
}
.figure.tagged{
  padding: 14px 14px 20px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(36,27,20,0.06);
}
.figure.tagged::before{
  content: "";
  position: absolute;
  top: -10px; left: 28px;
  width: 46px; height: 20px;
  background: var(--amber-soft);
  opacity: 0.85;
  transform: rotate(-3deg);
}

/* ---------------- Pull quote / dark band ---------------- */

.band{
  background: var(--wine-deep);
  color: #F3E9D8;
  padding: 120px 0;
}
.band .wrap{ max-width: 900px; }
.band blockquote{
  margin: 0;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(28px, 4.6vw, 50px);
  line-height: 1.28;
  color: #F8F1E1;
}
.band cite{
  display: block;
  margin-top: 28px;
  font-style: normal;
  font-size: 14px;
  letter-spacing: 0.02em;
  color: var(--amber-soft);
}

/* ---------------- Grape comparison ---------------- */

.grapes{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
}
@media (max-width: 820px){
  .grapes{ grid-template-columns: 1fr; }
}
.grape-card{
  border: 1px solid var(--rule);
  background: #F6F1E4;
  padding: 0;
  display: flex;
  flex-direction: column;
}
.grape-card img{ width: 100%; height: 300px; object-fit: cover; }
.grape-body{ padding: 30px 30px 34px; }
.grape-eyebrow{
  font-size: 12.5px;
  letter-spacing: 0.04em;
  color: var(--amber);
  font-family: var(--sans);
  font-weight: 600;
  margin-bottom: 6px;
}
.grape-card h3{
  font-size: 26px;
  margin-bottom: 4px;
}
.grape-card .latin{
  font-family: var(--serif);
  font-style: italic;
  color: var(--ink-soft);
  font-size: 15px;
  margin-bottom: 18px;
}
.grape-card p{ color: var(--ink-soft); font-size: 15.5px; }
.grape-specs{
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--rule);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 20px;
  font-size: 13.5px;
}
.grape-specs div span{
  display: block;
  color: var(--ink-soft);
  font-size: 11.5px;
  letter-spacing: 0.03em;
  margin-bottom: 2px;
}

/* ---------------- Name / family section ---------------- */

.name-wrap{
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 64px;
  align-items: center;
}
@media (max-width: 900px){
  .name-wrap{ grid-template-columns: 1fr; }
}
.name-formula{
  font-family: var(--serif);
  font-size: clamp(30px, 4vw, 44px);
  line-height: 1.5;
  color: var(--wine);
}
.name-formula .who{ color: var(--ink); font-weight: 400; font-size: 0.7em;}
.name-formula .syl{ font-weight: 700; }
.name-result{
  margin-top: 18px;
  font-size: clamp(38px, 5vw, 56px);
  font-weight: 600;
}

/* ---------------- Timeline / diary ---------------- */

.diary-year{
  margin-bottom: 8px;
}
.diary-year h3{
  font-size: 15px;
  font-family: var(--sans);
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--wine);
  margin: 64px 0 26px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--rule);
}
.diary-year:first-of-type h3{ margin-top: 0; }

.entry{
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 32px;
  padding: 30px 0;
  border-bottom: 1px solid var(--rule);
}
.entry:last-child{ border-bottom: none; }
@media (max-width: 720px){
  .entry{ grid-template-columns: 1fr; gap: 12px; }
}
.entry-date{
  font-family: var(--serif);
  font-style: italic;
  color: var(--ink-soft);
  font-size: 15px;
  padding-top: 4px;
}
.entry-text{ color: var(--ink-soft); font-size: 15.5px; margin-bottom: 18px; max-width: 58ch; }
.entry-text:empty{ display: none; }
.entry-gallery{
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
}
.entry-gallery img{
  width: 100%;
  height: 150px;
  object-fit: cover;
  cursor: zoom-in;
  transition: opacity .2s ease;
}
.entry-gallery img:hover{ opacity: 0.85; }
.entry-gallery.wide img{ height: 220px; }
.entry-stat{
  display: inline-block;
  margin-top: 14px;
  font-size: 13px;
  color: var(--amber);
  font-weight: 600;
}

/* ---------------- Closing / follow ---------------- */

.closing{
  background: var(--paper-dim);
}
.closing .wrap{
  max-width: 720px;
  text-align: left;
}
.closing h2{
  font-size: clamp(30px, 4.4vw, 46px);
  margin-bottom: 22px;
}
.closing p{ color: var(--ink-soft); font-size: 18px; }

.follow-form{
  margin-top: 40px;
  display: flex;
  gap: 12px;
  max-width: 460px;
  flex-wrap: wrap;
}
.follow-form input[type="email"]{
  flex: 1 1 240px;
  padding: 14px 16px;
  border: 1px solid var(--ink);
  background: transparent;
  font-family: var(--sans);
  font-size: 15px;
  color: var(--ink);
}
.follow-form input[type="email"]::placeholder{ color: var(--ink-soft); }
.follow-form button{
  padding: 14px 24px;
  background: var(--wine);
  color: #F4EFE2;
  border: 1px solid var(--wine);
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background .2s ease;
}
.follow-form button:hover{ background: var(--wine-deep); }
.follow-note{ margin-top: 12px; font-size: 13px; color: var(--ink-soft); }

.contact-block{
  margin-top: 34px;
  padding-top: 26px;
  border-top: 1px solid var(--rule);
}
.contact-block p{
  margin: 0 0 8px;
  font-size: 15px;
  color: var(--ink-soft);
}
.contact-block p:last-child{ margin-bottom: 0; }
.contact-block span{
  font-family: var(--serif);
  font-style: italic;
  color: var(--wine);
  margin-right: 6px;
}
.contact-block a{
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--amber-soft);
  text-underline-offset: 3px;
}
.contact-block a:hover{ color: var(--wine); }

/* ---------------- Footer ---------------- */

footer{
  padding: 48px 0;
  border-top: 1px solid var(--rule);
}
.footer-inner{
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  font-size: 13.5px;
  color: var(--ink-soft);
}
.footer-mark{
  font-family: var(--serif);
  font-style: italic;
  color: var(--wine);
}

/* ---------------- Lightbox ---------------- */

.lightbox{
  position: fixed;
  inset: 0;
  background: rgba(20,12,10,0.92);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 40px;
}
.lightbox.is-open{ display: flex; }
.lightbox img{
  max-width: 100%;
  max-height: 88vh;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}
.lightbox-close{
  position: absolute;
  top: 24px; right: 32px;
  color: #F4EFE2;
  font-size: 28px;
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--sans);
}

/* Focus visibility */
a:focus-visible, button:focus-visible, input:focus-visible{
  outline: 2px solid var(--wine);
  outline-offset: 2px;
}
