/* =========================================================================
   FYNE — Wine, Food, Bar
   ========================================================================= */

:root {
  --ink-0:  #142027;  /* darkest in palette */
  --ink-1:  #142027;  /* alias */
  --ink-3:  #354856;  /* secondary dark */

  --gold:        #E4CB8A;
  --gold-edge:   #C49C57;
  --cream:       #FFFEF7;
  --cream-mute:  rgba(255, 254, 247, 0.78);
  --cream-soft:  rgba(255, 254, 247, 0.6);
  --cream-faint: rgba(255, 254, 247, 0.38);
  --hair:        rgba(228, 203, 138, 0.35);
  --hair-soft:   rgba(228, 203, 138, 0.18);

  --gold-gradient: linear-gradient(135deg,
      #C49C57 0%, #DFC385 25%, #EFD693 50%,
      #CEAD67 75%, #C49C57 92%, #745936 100%);

  --serif: "Cormorant Garamond", "Hoefler Text", "Times New Roman", serif;
  --sans:  "Lato", -apple-system, "Helvetica Neue", Arial, sans-serif;

  --ease:      cubic-bezier(.22, .61, .36, 1);
  --ease-soft: cubic-bezier(.4, 0, .2, 1);
  --label-track: .38em;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

html {
  background: var(--ink-0);
  color: var(--cream);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-feature-settings: "kern", "liga";
}

body {
  font-family: var(--sans);
  font-weight: 300;
  font-size: 17px;
  line-height: 1.65;
  color: var(--cream);
  background: var(--ink-0);
  min-height: 100svh;
  overflow-x: hidden;
}

::selection { background: rgba(228, 203, 138, .3); color: var(--cream); }

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

/* Skip link */
.skip {
  position: absolute;
  left: -9999px;
  top: 8px;
  background: var(--ink-1);
  color: var(--gold);
  padding: 12px 18px;
  text-decoration: none;
  font-size: 13px;
  z-index: 200;
}
.skip:focus { left: 8px; }

/* =========================================================================
   Grain overlay
   ========================================================================= */

.grain {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: .06;
  mix-blend-mode: overlay;
  z-index: 50;
}

/* =========================================================================
   Shared atoms
   ========================================================================= */

/* Small gold all-caps label */
.section-label,
.eyebrow-text {
  font-family: var(--sans);
  font-weight: 400;
  font-size: 11px;
  letter-spacing: var(--label-track);
  text-transform: uppercase;
  background: var(--gold-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin: 0;
}

/* Reveal-on-scroll: progressive enhancement, visible by default. */
.reveal { opacity: 1; }
.js .reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .9s var(--ease-soft), transform .9s var(--ease-soft);
}
.js .reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* =========================================================================
   1. HERO
   ========================================================================= */

.hero {
  position: relative;
  min-height: 100svh;
  width: 100%;
  overflow: hidden;
  isolation: isolate;
}

.hero-bg-grad {
  position: absolute; inset: 0; z-index: 0;
  background:
    radial-gradient(ellipse 90% 70% at 50% 35%,
      var(--ink-3) 0%,
      var(--ink-1) 60%,
      var(--ink-0) 100%);
}

.hero-content {
  position: relative;
  z-index: 3;
  min-height: 100svh;
  width: 100%;
  padding: 28px 24px 96px;
  display: grid;
  grid-template-rows: auto 1fr auto;
  grid-template-areas:
    "tl"
    "stage"
    "bl";
}

@media (min-width: 768px) {
  .hero-content {
    padding: 44px 56px 56px;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto 1fr auto;
    grid-template-areas:
      "tl tr"
      "stage stage"
      "bl br";
    column-gap: 24px;
  }
}

/* Eyebrow top-left */
.eyebrow {
  grid-area: tl;
  display: inline-flex;
  align-items: center;
  gap: 14px;
  align-self: start;
  justify-self: start;
  opacity: 0;
  animation: fadeUp .9s var(--ease) .25s forwards;
}
.eyebrow-rule {
  display: block;
  width: 28px;
  height: 1px;
  background: var(--hair);
}

/* Stage (logo + tagline) */
.hero-stage {
  grid-area: stage;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 32px;
  padding: 32px 0;
}

.hero-logo {
  width: 200px;
  max-width: 70vw;
  height: auto;
  opacity: 0;
  filter: drop-shadow(0 12px 36px rgba(0,0,0,.45));
  animation: fadeUp 1.1s var(--ease) .55s forwards;
}

@media (min-width: 768px) {
  .hero-logo { width: 280px; }
}

.hero-tagline {
  margin: 0;
  font-family: var(--sans);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(1.25rem, 3.6vw, 1.55rem);
  line-height: 1.35;
  color: var(--cream);
  letter-spacing: .005em;
  max-width: 28ch;
  text-wrap: balance;
  opacity: 0;
  animation: fadeUp 1.1s var(--ease) 1.05s forwards;
}

@media (min-width: 768px) {
  .hero-tagline { font-size: clamp(1.4rem, 2vw, 1.75rem); }
}

/* Bottom-left meta */
.hero-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-family: var(--sans);
  font-size: 10px;
  font-weight: 400;
  letter-spacing: .32em;
  text-transform: uppercase;
  opacity: 0;
  animation: fadeUp 1s var(--ease) 1.4s forwards;
}
.hero-meta-bl { grid-area: bl; align-self: end; justify-self: start; }
.hero-meta-br { grid-area: br; align-self: end; justify-self: end; text-align: right; }

@media (max-width: 767px) {
  .hero-meta-br {
    grid-area: bl;
    justify-self: end;
    text-align: right;
  }
  .hero-meta-bl, .hero-meta-br {
    grid-row: 3;
  }
  .hero-content {
    grid-template-areas:
      "tl"
      "stage"
      "bl";
  }
  .hero-meta-bl { grid-column: 1; }
}

.meta-line {
  color: var(--gold);
  background: var(--gold-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.meta-line-soft { color: var(--cream-soft); background: none; -webkit-text-fill-color: var(--cream-soft); }

/* Scroll indicator — pulsing gold hairline below center */
.hero-scroll {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  width: 24px;
  height: 56px;
  display: flex;
  justify-content: center;
  opacity: 0;
  animation: fadeIn 1s var(--ease) 1.9s forwards;
  z-index: 4;
}
.hero-scroll-line {
  width: 1px;
  height: 40px;
  background: var(--gold-gradient);
  animation: pulse 3s var(--ease-soft) infinite;
  transform-origin: top center;
}
@keyframes pulse {
  0%, 100% { transform: scaleY(.6); opacity: .55; }
  50%      { transform: scaleY(1);  opacity: 1;   }
}

/* Hero load animations */
@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeIn { to { opacity: 1; } }

/* =========================================================================
   2. STORY (with cellar photo background)
   ========================================================================= */

.story {
  position: relative;
  padding: 96px 24px 112px;
  background:
    radial-gradient(ellipse 80% 60% at 50% 50%,
      var(--ink-3) 0%,
      var(--ink-1) 70%,
      var(--ink-0) 100%);
  overflow: hidden;
}

.story-grid {
  max-width: 1080px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 48px;
  align-items: stretch;
}

.story-text-col { max-width: 540px; }

.story-text {
  margin: 0 0 24px;
  font-family: var(--sans);
  font-weight: 300;
  font-size: 16px;
  line-height: 1.7;
  color: var(--cream);
}
.story-text:last-of-type { margin-bottom: 28px; }

.story-signature {
  margin: 0;
  font-family: var(--sans);
  font-weight: 400;
  font-size: 11px;
  letter-spacing: var(--label-track);
  text-transform: uppercase;
  background: var(--gold-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.story-socials {
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: 100%;
  max-width: 360px;
}

@media (min-width: 768px) {
  .story { padding: 140px 56px 160px; }
  .story-grid {
    flex-direction: row;
    align-items: flex-start;
    justify-content: space-between;
    gap: 64px;
  }
  .story-text-col { flex: 1 1 0; max-width: 540px; }
  .story-text { font-size: 17px; }
  .story-socials {
    flex: 0 0 360px;
    max-width: 360px;
  }
}

.ornament {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  width: 80px;
  margin: 56px auto 0;
}
.ornament-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(to right,
      transparent 0%, var(--gold) 50%, transparent 100%);
  opacity: .65;
}
.ornament-diamond {
  width: 5px;
  height: 5px;
  transform: rotate(45deg);
  background: var(--gold-gradient);
  flex-shrink: 0;
}

/* =========================================================================
   3. INSTAGRAM
   ========================================================================= */

.ig {
  background: var(--ink-1);
  padding: 96px 24px;
}

.ig-grid {
  max-width: 600px;
  margin: 0 auto;
}

.ig-text {
  text-align: center;
}

.ig-body {
  margin: 18px 0 32px;
  font-family: var(--sans);
  font-weight: 300;
  font-size: clamp(1.15rem, 4vw, 1.35rem);
  line-height: 1.6;
  color: var(--cream-mute);
}

.btn-ig,
.btn-social {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 0 30px;
  min-height: 54px;
  text-decoration: none;
  font-family: var(--sans);
  font-weight: 500;
  font-size: 12px;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: var(--cream);
  background:
    linear-gradient(var(--ink-0), var(--ink-0)) padding-box,
    var(--gold-gradient) border-box;
  border: 1px solid transparent;
  border-radius: 0;
  position: relative;
  cursor: pointer;
  transition: color .4s var(--ease-soft);
  -webkit-tap-highlight-color: transparent;
}
.btn-ig::before,
.btn-social::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--gold-gradient);
  opacity: 0;
  transition: opacity .4s var(--ease-soft);
  z-index: -1;
}
.btn-ig:hover, .btn-ig:focus-visible,
.btn-social:hover, .btn-social:focus-visible {
  color: var(--ink-1);
  outline: none;
}
.btn-ig:hover::before, .btn-ig:focus-visible::before,
.btn-social:hover::before, .btn-social:focus-visible::before {
  opacity: 1;
}
.btn-ig svg, .btn-social svg { flex-shrink: 0; }

/* Tall social buttons in the story section */
.btn-social {
  width: 100%;
  min-height: 84px;
  font-size: 13px;
  letter-spacing: .24em;
}
.btn-social svg { width: 22px; height: 22px; }
.btn-social .ig-icon { color: var(--gold); }

@media (min-width: 768px) {
  .ig { padding: 140px 56px; }
  .ig-body { font-size: 1.4rem; }
}

/* =========================================================================
   5. MAILING
   ========================================================================= */

.mail {
  background: var(--ink-0);
  position: relative;
  padding: 96px 24px 112px;
  overflow: hidden;
}

.mail-inner {
  position: relative;
  max-width: 540px;
  margin: 0 auto;
  text-align: center;
}

.mail-body {
  margin: 18px 0 36px;
  font-family: var(--sans);
  font-weight: 300;
  font-size: clamp(1.15rem, 4vw, 1.35rem);
  line-height: 1.6;
  color: var(--cream-mute);
}

@media (min-width: 768px) {
  .mail { padding: 144px 56px 168px; }
  .mail-body { font-size: 1.4rem; }
}

.signup {
  margin: 0 auto;
  width: 100%;
  max-width: 460px;
}

.hp {
  position: absolute;
  left: -9999px;
  width: 1px; height: 1px;
  opacity: 0;
  pointer-events: none;
}

.signup-row {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.signup input[type="email"] {
  width: 100%;
  min-height: 52px;
  padding: 0 18px;
  background: transparent;
  border: 1px solid var(--gold-edge);
  border-radius: 0;
  font-family: var(--sans);
  font-weight: 300;
  font-size: 16px;
  letter-spacing: .01em;
  color: var(--cream);
  text-align: center;
  transition: border-color .35s var(--ease), box-shadow .35s var(--ease);
  -webkit-appearance: none;
  appearance: none;
}
.signup input[type="email"]::placeholder {
  color: var(--cream-faint);
}
.signup input[type="email"]:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 1px var(--gold), 0 0 0 4px rgba(228,203,138,.1);
}

.btn-submit {
  min-height: 52px;
  padding: 0 28px;
  border: 0;
  border-radius: 0;
  cursor: pointer;
  background: var(--gold-gradient);
  background-size: 220% 220%;
  background-position: 0% 50%;
  color: var(--ink-1);
  font-family: var(--sans);
  font-weight: 500;
  font-size: 12px;
  letter-spacing: .28em;
  text-transform: uppercase;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: background-position .6s var(--ease-soft), box-shadow .35s var(--ease), transform .15s var(--ease);
  -webkit-tap-highlight-color: transparent;
}
.btn-submit:hover, .btn-submit:focus-visible {
  background-position: 100% 50%;
  outline: none;
  box-shadow: 0 12px 36px -12px rgba(228,203,138,.55);
}
.btn-submit:active { transform: translateY(1px); }
.btn-submit[disabled] { cursor: not-allowed; opacity: .7; }

.btn-spinner {
  display: none;
  width: 14px; height: 14px;
  border-radius: 50%;
  border: 1.5px solid rgba(20,32,39,.25);
  border-top-color: var(--ink-1);
  animation: spin .7s linear infinite;
}
.btn-submit.is-loading .btn-label { opacity: .55; }
.btn-submit.is-loading .btn-spinner { display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

@media (min-width: 600px) {
  .signup-row { flex-direction: row; gap: 0; }
  .signup-row input[type="email"] {
    flex: 1;
    border-right: 0;
    text-align: left;
  }
  .signup-row .btn-submit {
    flex: 0 0 auto;
  }
}

.form-message {
  margin: 22px 0 0;
  min-height: 1.4em;
  font-family: var(--sans);
  font-weight: 300;
  font-size: 15px;
  color: var(--cream-mute);
}
.form-message.is-success {
  background: var(--gold-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.form-message.is-error {
  font-style: normal;
  font-family: var(--sans);
  font-size: 13px;
  letter-spacing: .02em;
  color: #C97D6E;
}

.signup.is-done .signup-row { display: none; }
.signup.is-done .form-message {
  margin-top: 0;
  font-size: 1.4rem;
}

/* =========================================================================
   6. FOOTER
   ========================================================================= */

.foot {
  background: var(--ink-0);
  padding: 64px 24px 40px;
  position: relative;
}

.foot-grid {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 32px;
  max-width: 1080px;
  margin: 0 auto;
}

.foot-col { display: flex; flex-direction: column; align-items: center; gap: 10px; }

.foot-mark { width: 80px; height: auto; }
.foot-sub {
  margin: 0;
  font-family: var(--sans);
  font-size: 10px;
  font-weight: 400;
  letter-spacing: var(--label-track);
  text-transform: uppercase;
  color: var(--cream-soft);
}

.foot-line {
  margin: 0;
  font-family: var(--sans);
  font-weight: 400;
  font-size: 19px;
  line-height: 1.5;
  color: var(--cream);
}
.foot-line-soft {
  color: var(--cream-soft);
  font-size: 15px;
  font-weight: 300;
}

.foot-ig {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px; height: 44px;
  color: var(--gold);
  transition: color .35s var(--ease), transform .35s var(--ease);
  text-decoration: none;
}
.foot-ig:hover { color: var(--cream); transform: translateY(-1px); }

.foot-hairline {
  display: block;
  margin: 40px auto 24px;
  width: 100%;
  max-width: 1080px;
  height: 1px;
  background: linear-gradient(to right, transparent 0%, var(--hair) 50%, transparent 100%);
}

.foot-credit {
  margin: 0;
  text-align: center;
  font-family: var(--sans);
  font-size: 10px;
  font-weight: 300;
  letter-spacing: .26em;
  text-transform: uppercase;
  color: var(--cream-faint);
}

@media (min-width: 768px) {
  .foot { padding: 96px 56px 48px; }
  .foot-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    align-items: center;
    gap: 32px;
  }
  .foot-col { gap: 8px; }
  .foot-left   { align-items: flex-start; text-align: left; }
  .foot-center { align-items: center;     text-align: center; }
  .foot-right  { align-items: flex-end;   text-align: right; }
}

/* =========================================================================
   Utilities
   ========================================================================= */

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

/* =========================================================================
   Reduced motion
   ========================================================================= */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .hero-bg img { animation: none; transform: none; }
  .js .reveal { opacity: 1; transform: none; }
}
