/* ==========================================================================
   RAMIAN — styles.css
   Classical label design: ivory paper, black rope borders, charcoal damask,
   old-style serif capitals and an engraver's script, taken from the bottle label.

   Contents
   1.  Design tokens
   2.  Reset & base
   3.  Ornament: rope, damask, flourish, plate (framed image)
   4.  Type & buttons
   5.  Layout utilities
   6.  Navigation & mobile menu
   7.  Hero
   8.  Introduction / The Estate
   9.  The Wines (label plates)
   10. Philosophy
   11. Visual break
   12. Contact
   13. Footer
   14. Contact modal & form
   15. Motion
   16. Responsive
   ========================================================================== */


/* ==========================================================================
   1. DESIGN TOKENS
   ========================================================================== */
:root {
  /* paper & ink */
  --paper:      #F7F4EC;   /* ivory ground */
  --paper-2:    #ECE7DA;   /* deeper ivory band */
  --white:      #FFFFFF;   /* label stock */
  --ink:        #0F0F10;   /* label black */
  --muted:      #5A5852;   /* secondary text on paper (6:1) */

  /* charcoal & silver (the seal, the neck label) */
  --charcoal:   #2B2B2E;
  --damask:     #2C2C2F;
  --silver:     #C9CACD;
  --silver-70:  rgba(201, 202, 205, 0.72);
  --on-dark:    rgba(247, 244, 236, 0.84);

  --rule:       rgba(15, 15, 16, 0.2);

  /* type */
  --serif:  "EB Garamond", Garamond, "Times New Roman", serif;
  --script: "Pinyon Script", "Snell Roundhand", "Apple Chancery", cursive;

  --header-h: 5.2rem;
  --rope-h:   12px;
  --ease:     cubic-bezier(.22, .61, .36, 1);
}


/* ==========================================================================
   2. RESET & BASE
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: clamp(1.12rem, 1.1vw + .7rem, 1.3rem);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body.is-locked { overflow: hidden; }
img, svg { display: block; max-width: 100%; }
img { height: auto; }
h1, h2, h3, p, ul, figure, dl, dd { margin: 0; padding: 0; }
ul { list-style: none; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
::selection { background: var(--charcoal); color: var(--paper); }
:focus-visible { outline: 2px solid currentColor; outline-offset: 4px; }

.skip-link {
  position: fixed; left: 1rem; top: -4rem; z-index: 100;
  background: var(--ink); color: var(--paper); padding: .7rem 1.1rem;
  font-size: .85rem; letter-spacing: .2em; text-transform: uppercase; transition: top .2s;
}
.skip-link:focus { top: 1rem; }


/* ==========================================================================
   3. ORNAMENT
   ========================================================================== */

/* The twisted cord from the label's top and bottom borders */
.rope {
  height: var(--rope-h);
  background: url("images/rope.svg") center top / auto var(--rope-h) repeat-x;
}
.rope--light { filter: invert(1); }          /* black cord → silver-white, for dark grounds */

/* The tone-on-tone damask from the neck label */
.damask {
  background-color: var(--damask);
  background-image: url("images/damask.svg");
  background-size: 200px 200px;
}

/* line – diamond – line */
.flourish {
  display: flex; align-items: center; justify-content: center; gap: 1rem;
  margin: 1.8rem 0 2.4rem;
}
.flourish::before, .flourish::after {
  content: ""; width: 4.5rem; height: 1px; background: currentColor; opacity: .45;
}
.flourish i { width: 7px; height: 7px; background: currentColor; transform: rotate(45deg); opacity: .8; }

/* A framed photograph: white mat, black keyline, fine inner line (the label's die-line border) */
.plate {
  position: relative;
  width: calc(100% - 2.5rem); max-width: 64rem; margin-inline: auto;
  padding: .7rem; background: var(--white); border: 1px solid var(--ink);
}
.plate::after {
  content: ""; position: absolute; top: .7rem; right: .7rem; bottom: .7rem; left: .7rem; pointer-events: none;
  border: 1px solid rgba(255, 255, 255, .55);
}
.plate img { width: 100%; height: auto; }
.plate--dark { background: transparent; border-color: var(--silver-70); }
.plate--dark::after { border-color: rgba(201, 202, 205, .45); }


/* ==========================================================================
   4. TYPE & BUTTONS
   ========================================================================== */
.caps {
  font-weight: 600; text-transform: uppercase; letter-spacing: .22em; line-height: 1.35;
}
.eyebrow {
  display: flex; align-items: center; justify-content: center; gap: 1rem;
  font-size: .82rem; font-weight: 600; letter-spacing: .38em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 1.4rem;
}
.eyebrow::before, .eyebrow::after { content: ""; width: 2.6rem; height: 1px; background: currentColor; opacity: .5; }

.btn {
  display: inline-block; border-radius: 0; -webkit-appearance: none; appearance: none; line-height: 1.3;
  font-family: var(--serif); font-weight: 600; font-size: .8rem;
  letter-spacing: .32em; text-transform: uppercase; padding: 1rem 2.2rem .95rem 2.5rem;
  border: 1px solid var(--ink); color: var(--ink);
  transition: background .4s var(--ease), color .4s var(--ease), border-color .4s var(--ease);
}
.btn:hover { background: var(--ink); color: var(--paper); }
.btn--solid { background: var(--ink); color: var(--paper); }
.btn--solid:hover { background: var(--charcoal); border-color: var(--charcoal); }


/* ==========================================================================
   5. LAYOUT
   ========================================================================== */
.container { width: 100%; margin-inline: auto; padding-inline: 1.5rem; max-width: 80rem; }
.container--narrow { max-width: 44rem; }
.container--wide   { max-width: 76rem; }
.section { padding-block: clamp(5rem, 11vw, 9rem); }


/* ==========================================================================
   6. NAVIGATION & MOBILE MENU
   Links split either side of the centre seal.
   ========================================================================== */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  color: var(--white);
  transition: background .5s var(--ease), color .5s var(--ease);
}
.site-header.is-scrolled { background: var(--paper); color: var(--ink); }

.nav {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  max-width: 92rem; margin-inline: auto; padding: 0 2rem; height: var(--header-h);
}
.nav__links { display: none; gap: 2.6rem; }
.nav__links--left  { justify-content: flex-end;   padding-right: 3.2rem; }
.nav__links--right { justify-content: flex-start; padding-left: 3.2rem; }
.nav__links a {
  display: inline-block; font-size: .78rem; font-weight: 600; letter-spacing: .32em; text-transform: uppercase;
  padding: .45rem 0 .35rem; border-bottom: 1px solid transparent;
  transition: border-color .4s var(--ease);
}
.nav__links a:hover, .nav__links a.is-active { border-bottom-color: currentColor; }

.nav__brand { display: block; width: 3.7rem; height: 3.7rem; opacity: 0; transition: opacity .5s var(--ease); }
.site-header.is-scrolled .nav__brand { opacity: 1; }
.seal { width: 100%; height: 100%; object-fit: contain; }   /* images/logo.svg: the square neck-label mark */

.nav__toggle {
  grid-column: 3; justify-self: end; width: 2.75rem; height: 2.75rem;
  display: flex; flex-direction: column; justify-content: center; align-items: flex-end; gap: 7px;
}
.nav__toggle-line { display: block; width: 1.7rem; height: 1px; background: currentColor; transition: transform .4s var(--ease), width .4s var(--ease); }
.nav__toggle-line:last-child { width: 1.1rem; }
.nav__toggle[aria-expanded="true"] .nav__toggle-line:first-child { transform: translateY(4px) rotate(45deg); }
.nav__toggle[aria-expanded="true"] .nav__toggle-line:last-child  { transform: translateY(-4px) rotate(-45deg); width: 1.7rem; }

.site-header__rope {
  height: var(--rope-h); opacity: 0; transition: opacity .5s var(--ease);
  background: url("images/rope.svg") center top / auto var(--rope-h) repeat-x;
}
.site-header.is-scrolled .site-header__rope { opacity: 1; }

/* Mobile menu */
.mobile-menu {
  position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: 40; color: var(--paper);
  display: flex; align-items: center; justify-content: center; text-align: center;
  opacity: 0; visibility: hidden; transition: opacity .5s var(--ease), visibility 0s linear .5s;
}
.mobile-menu.is-open { opacity: 1; visibility: visible; transition-delay: 0s; }
.mobile-menu__seal { width: 4.6rem; height: 4.6rem; margin: 0 auto 2.4rem; }
.mobile-menu__links { display: grid; gap: 1.7rem; }
.mobile-menu__links a {
  font-size: 1.15rem; font-weight: 600; letter-spacing: .34em; text-transform: uppercase; padding-left: .34em;
}
.mobile-menu__foot { margin-top: 3rem; font-style: italic; color: var(--silver-70); }
.site-header.is-menu-open { color: var(--paper); }


/* ==========================================================================
   7. HERO — a photograph with a label card laid over it
   ========================================================================== */
.hero {
  position: relative; min-height: 100vh; min-height: 100svh;
  display: flex; align-items: center; justify-content: center; overflow: hidden;
  padding: calc(var(--header-h) + 4.5rem) 1.25rem 6.5rem;
  background-color: var(--damask); background-image: url("images/damask.svg"); background-size: 200px 200px;   /* shows if the photo is missing */
}
.hero__media { position: absolute; top: 0; right: 0; bottom: 0; left: 0; }
.hero__img { width: 100%; height: 100%; object-fit: cover; }
.hero__scrim {
  position: absolute; top: 0; right: 0; bottom: 0; left: 0;
  background: linear-gradient(to bottom, rgba(12,12,13,.6), rgba(12,12,13,.18) 38%, rgba(12,12,13,.5));
}

.hero__card {
  position: relative; z-index: 2; width: 100%; max-width: 34rem;
  background: var(--white); text-align: center;
  padding: 6rem 2rem 4rem;
  box-shadow: 0 40px 90px -35px rgba(0, 0, 0, .7);
}
.hero__card::before, .hero__card::after {
  content: ""; position: absolute; left: 0; right: 0; height: var(--rope-h);
  background: url("images/rope.svg") center top / auto var(--rope-h) repeat-x;
}
.hero__card::before { top: 0; }
.hero__card::after  { bottom: 0; }
.hero__seal { position: absolute; z-index: 3; top: -4rem; left: 50%; width: 8rem; height: 8rem; margin-left: -4rem; filter: drop-shadow(0 12px 20px rgba(0, 0, 0, .45)); }

.hero__place { font-size: .85rem; font-weight: 600; letter-spacing: .5em; padding-left: .5em; text-transform: uppercase; color: var(--muted); }
.hero__title { margin-top: 1.1rem; }
.hero__name {
  display: block; font-weight: 700; text-transform: uppercase;
  font-size: clamp(2.7rem, 8vw, 4.7rem); letter-spacing: .26em; padding-left: .26em; line-height: 1.1;
}
.hero__script { margin-top: 1.7rem; font-family: var(--script); font-size: clamp(2.4rem, 5.4vw, 3.4rem); line-height: 1.2; }

.hero__explore {
  position: absolute; z-index: 2; left: 50%; bottom: 1.6rem; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: .8rem; color: var(--white);
}
.hero__explore-label { font-size: .72rem; font-weight: 600; letter-spacing: .5em; padding-left: .5em; text-transform: uppercase; }
.hero__explore-line { width: 1px; height: 2.6rem; background: currentColor; opacity: .7; }


/* ==========================================================================
   8. INTRODUCTION / THE ESTATE
   ========================================================================== */
.intro { text-align: center; }
.intro__title { font-size: clamp(1.7rem, 3.6vw, 2.7rem); }
.intro__body p + p { margin-top: 1.4em; }
.intro__close { margin-top: 3.2rem; font-style: italic; font-size: 1.32rem; line-height: 1.5; }
.intro__close span { display: block; }
.intro__close span + span::before {
  content: ""; display: block; width: 5px; height: 5px; margin: .85rem auto; background: currentColor; opacity: .45; transform: rotate(45deg);
}
.intro__figure { margin-top: clamp(4rem, 8vw, 6.5rem); }


/* ==========================================================================
   9. THE WINES — four label plates
   A damask neck label above the main label (white stock, rope borders, script name).
   ========================================================================== */
.wines { background: var(--paper-2); text-align: center; }
.wines__intro { margin-bottom: clamp(3rem, 6vw, 5rem); }
.wines__heading { font-size: clamp(1.5rem, 3.2vw, 2.4rem); max-width: 40rem; margin-inline: auto; }
.wines__grid { display: grid; grid-template-columns: 1fr; gap: clamp(3rem, 5vw, 4.5rem) clamp(2rem, 4vw, 3.5rem); }

.wine { display: flex; flex-direction: column; }
.wine__panel {
  position: relative; aspect-ratio: 1 / 1; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 1.1rem;                       /* the gap between neck label and main label, as on the label sheet */
}
.wine__panel::after {
  content: ""; position: absolute; top: 0; right: 0; bottom: 0; left: 0; pointer-events: none;
  background: radial-gradient(ellipse at 50% 52%, rgba(0,0,0,0) 38%, rgba(0,0,0,.5) 100%);
}
.wine__bottle { position: relative; z-index: 1; height: 86%; width: auto; transition: transform 1.6s var(--ease); }
.wine:hover .wine__bottle { transform: translateY(-.4rem); }

.wine__label {
  position: relative; flex: 1; background: var(--white);
  padding: 3.4rem 2.4rem 3.2rem; display: flex; flex-direction: column; align-items: center; text-align: center;
}
.wine__label::before, .wine__label::after {
  content: ""; position: absolute; left: 0; right: 0; height: var(--rope-h);
  background: url("images/rope.svg") center top / auto var(--rope-h) repeat-x;
}
.wine__label::before { top: 0; }
.wine__label::after  { bottom: 0; }

.wine__house { font-weight: 700; font-size: 1.35rem; letter-spacing: .36em; padding-left: .36em; text-transform: uppercase; }
.wine__name  { font-family: var(--script); font-weight: 400; font-size: clamp(3.1rem, 5.6vw, 4.4rem); line-height: 1.15; margin: .9rem 0 1.2rem; }
.wine__variety, .wine__place {
  font-size: 1.02rem; font-weight: 500; letter-spacing: .24em; padding-left: .24em; text-transform: uppercase; line-height: 1.5;
}
.wine__place { margin-top: .7rem; }
.wine__alc {                                   /* reads bottom-to-top up the left edge, as on the label */
  position: absolute; left: .95rem; top: calc(100% - 3.1rem);
  transform-origin: 0 0; transform: rotate(-90deg); white-space: nowrap;
  font-size: .72rem; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; line-height: 1; color: var(--ink);
}
.wine__line { margin: 1.7rem 0 1.3rem; max-width: 22rem; font-style: italic; color: var(--muted); font-size: 1.06rem; line-height: 1.55; }
.wine__price {                                 /* per 750 ml bottle */
  margin: 0 0 1.9rem; font-weight: 600; font-size: 1.2rem; letter-spacing: .22em; padding-left: .22em;
}
.wine .btn { margin-top: auto; flex: none; }


/* ==========================================================================
   10. PHILOSOPHY — on damask
   ========================================================================== */
.philosophy { position: relative; color: var(--paper); }
.philosophy::before {                              /* quiets the pattern behind the text */
  content: ""; position: absolute; top: 0; right: 0; bottom: 0; left: 0; pointer-events: none;
  background: linear-gradient(90deg, rgba(16, 16, 18, .66), rgba(16, 16, 18, .3) 62%, rgba(16, 16, 18, .12));
}
.philosophy__grid { position: relative; display: grid; grid-template-columns: 1fr; gap: 3.5rem; align-items: center; }
.philosophy .eyebrow { justify-content: flex-start; color: var(--silver); }
.philosophy .eyebrow::before { display: none; }
.philosophy__heading { font-size: clamp(1.6rem, 3.4vw, 2.6rem); }
.philosophy__body { margin-top: 2rem; color: var(--on-dark); max-width: 34rem; }
.philosophy__body p + p { margin-top: 1.2em; }
.philosophy__figure { margin: 0; width: 100%; }


/* ==========================================================================
   11. VISUAL BREAK — a framed band between two rope rules
   ========================================================================== */
.break { background: var(--paper); }
.break__media { position: relative; height: clamp(22rem, 64vh, 38rem); overflow: hidden; background: var(--charcoal); }
.break__media img { width: 100%; height: 100%; object-fit: cover; }
img.is-missing { visibility: hidden; }          /* set by script.js when a photo file is missing */
.break__scrim { position: absolute; top: 0; right: 0; bottom: 0; left: 0; background: rgba(10, 10, 11, .52); }
.break__content { position: absolute; top: 0; right: 0; bottom: 0; left: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; color: var(--white); }
.break__name { font-weight: 700; text-transform: uppercase; font-size: clamp(1.8rem, 5.4vw, 3.8rem); letter-spacing: .32em; padding-left: .32em; line-height: 1.2; }
.break__place { margin-top: 1rem; font-size: .88rem; font-weight: 600; letter-spacing: .6em; padding-left: .6em; text-transform: uppercase; }


/* ==========================================================================
   12. CONTACT
   ========================================================================== */
.contact { text-align: center; }
.contact__seal { width: 5.4rem; height: 5.4rem; margin: 0 auto 2rem; }
.contact__heading { font-size: clamp(1.6rem, 3.4vw, 2.5rem); }
.contact__sub { margin: 1.4rem auto 2.4rem; max-width: 30rem; font-style: italic; color: var(--muted); }


/* ==========================================================================
   13. FOOTER
   ========================================================================== */
.footer { position: relative; color: var(--silver); padding: clamp(4.5rem, 8vw, 6.5rem) 0 2.4rem; text-align: center; }
.footer__rope { position: absolute; top: 0; left: 0; right: 0; }
.footer__seal { width: 4.8rem; height: 4.8rem; margin: 0 auto 1.4rem; }
.footer__name { font-weight: 700; text-transform: uppercase; letter-spacing: .36em; padding-left: .36em; color: var(--paper); font-size: 1.25rem; }
.footer__place { margin-top: .4rem; font-style: italic; color: var(--silver-70); }
.footer__nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 1rem 2.4rem; margin-top: 2.4rem; }
.footer__nav a { font-size: .75rem; font-weight: 600; letter-spacing: .32em; text-transform: uppercase; transition: color .3s; }
.footer__nav a:hover { color: var(--white); }
.footer__legal {
  display: flex; flex-wrap: wrap; justify-content: center; gap: .4rem 2rem; margin-top: 3rem; padding-top: 1.6rem;
  border-top: 1px solid rgba(201, 202, 205, .22); font-size: .9rem; color: var(--silver-70);
}


/* ==========================================================================
   14. CONTACT MODAL & FORM
   ========================================================================== */
.modal { position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: 80; display: flex; align-items: center; justify-content: center; padding: 1.25rem; opacity: 0; visibility: hidden; transition: opacity .4s var(--ease), visibility 0s linear .4s; }
.modal.is-open { opacity: 1; visibility: visible; transition-delay: 0s; }
.modal__backdrop { position: absolute; top: 0; right: 0; bottom: 0; left: 0; background: rgba(10, 10, 11, .78); }
.modal__panel {
  position: relative; width: 100%; max-width: 34rem; max-height: calc(100vh - 2.5rem); overflow-y: auto;
  background: var(--white); padding: 3.4rem 2.2rem 3rem; text-align: center;
}
.modal__close { position: absolute; top: 1.6rem; right: 1rem; width: 2.6rem; height: 2.6rem; font-size: 1.9rem; line-height: 1; z-index: 1; }
.modal__title { font-size: 1.7rem; }
.modal__sub { margin: .9rem 0 2rem; font-style: italic; color: var(--muted); }

.form { text-align: left; }
.form__row { margin-bottom: 1.35rem; }
.form__label { display: block; font-size: .72rem; font-weight: 600; letter-spacing: .3em; text-transform: uppercase; color: var(--muted); margin-bottom: .2rem; }
.form__input {
  width: 100%; border: 0; border-bottom: 1px solid rgba(15,15,16,.35); background: transparent; border-radius: 0;
  font-family: var(--serif); font-size: 1.2rem; padding: .5rem 0; color: var(--ink); outline: none; transition: border-color .3s;
}
.form__input:focus { border-bottom-color: var(--ink); }
.form__input--area { resize: vertical; min-height: 6.5rem; }
.form__input.is-invalid { border-bottom-color: #9b2c2c; }
.form__hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form__status { min-height: 1.5rem; margin-bottom: 1rem; font-style: italic; }
.form__status.is-error { color: #9b2c2c; }
.form__status.is-success { color: var(--charcoal); }
.form__submit { width: 100%; }


/* ==========================================================================
   15. MOTION — a plain fade, no movement
   ========================================================================== */
.js .reveal, .js .reveal-img { opacity: 0; transition: opacity 1.3s var(--ease); }
.js .reveal[data-delay="1"] { transition-delay: .15s; }
.js .reveal[data-delay="2"] { transition-delay: .3s; }
.js .reveal[data-delay="3"] { transition-delay: .45s; }
.js .reveal.is-visible, .js .reveal-img.is-visible { opacity: 1; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01s !important; animation: none !important; }
  .js .reveal, .js .reveal-img { opacity: 1; }
}


/* ==========================================================================
   16. RESPONSIVE
   ========================================================================== */
@media (min-width: 56.25em) {                         /* ≥ 900px */
  .nav__links { display: flex; }
  .nav__toggle { display: none; }
  .wines__grid { grid-template-columns: repeat(2, 1fr); }
  .philosophy__grid { grid-template-columns: 1.05fr .95fr; gap: 5rem; }
}
@media (max-width: 40em) {                            /* ≤ 640px */
  .hero__card { padding: 5.8rem 1.4rem 3.6rem; }
  .wine__label { padding: 3.2rem 1.6rem 3.1rem; }
  .wine__variety, .wine__place { font-size: .92rem; letter-spacing: .16em; padding-left: .16em; }
  .wine__alc { left: .7rem; }
  .modal__panel { padding: 3.4rem 1.4rem 2.8rem; }
}
@media (max-height: 30em) { .hero { min-height: 32rem; } }
