/* Photography-led homepage concept: immersive hero and visual producer grid. */
body[data-page="home"] {
  --bg: #ffffff;
  --paper: #ffffff;
  --muted: #f1eee8;
  --line: #ddd7ce;
  --text: #151515;
  --soft-text: #5d5953;
  --accent: #7b1f2a;
}

body[data-page="home"] .site-header {
  background: rgba(255, 255, 255, .94);
}

body[data-page="home"] .hero {
  position: relative;
  display: flex;
  align-items: flex-end;
  max-width: none;
  min-height: min(66vh, 720px);
  padding: clamp(44px, 6vw, 72px) clamp(20px, 6vw, 80px);
  overflow: hidden;
  border-bottom: 0;
  color: white;
}

body[data-page="home"] .hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, rgba(0,0,0,.08) 15%, rgba(0,0,0,.18) 48%, rgba(0,0,0,.68) 100%);
  pointer-events: none;
}

body[data-page="home"] .hero-image {
  position: absolute;
  inset: 0;
  z-index: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

body[data-page="home"] .hero-image img {
  width: 100%;
  height: 100%;
  aspect-ratio: auto;
  object-fit: cover;
}

body[data-page="home"] .hero-copy {
  position: relative;
  z-index: 2;
  width: min(900px, 100%);
  padding-top: 90px;
}

body[data-page="home"] .hero h1 {
  max-width: 820px;
  margin: 0 0 20px;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: clamp(46px, 6.5vw, 82px);
  line-height: .98;
  letter-spacing: -.035em;
  font-weight: 400;
  text-shadow: 0 1px 24px rgba(0,0,0,.18);
}

body[data-page="home"] .hero-copy > p:not(.kicker) {
  max-width: 700px;
  margin: 0;
  color: rgba(255,255,255,.92);
  font-size: clamp(18px, 2vw, 22px);
  line-height: 1.55;
}

body[data-page="home"] .hero .button {
  border-color: white;
}

body[data-page="home"] .hero .button.primary {
  background: white;
  color: #151515;
}

body[data-page="home"] .hero .button.secondary {
  background: transparent;
  color: white;
}

body[data-page="home"] main > .section:not(.hero) {
  padding-top: 92px;
  padding-bottom: 92px;
}

body[data-page="home"] .section-heading {
  grid-template-columns: 1fr;
  gap: 0;
  align-items: end;
  margin-bottom: 38px;
}

body[data-page="home"] .section-heading h2 {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: clamp(44px, 5.5vw, 68px);
  font-weight: 400;
}

body[data-page="home"] #homeWinePreview {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

body[data-page="home"] #homeWinePreview .wine-card {
  border-top: 0;
  padding: 0 0 18px;
}

body[data-page="home"] #homeWinePreview .wine-card img {
  aspect-ratio: 4 / 5;
  padding: 28px;
  border: 0;
  background: #f4f1eb;
}

body[data-page="home"] .featured-wines-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 28px;
}

body[data-page="home"] .featured-wines-actions .button {
  border-color: var(--accent);
  background: var(--accent);
  color: white;
}

body[data-page="home"] #homeWineryPreview {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

body[data-page="home"] #homeWineryPreview .winery-card {
  position: relative;
  min-height: 420px;
  overflow: hidden;
  padding: 0;
  border-top: 0;
  background: #171717;
  color: white;
}

body[data-page="home"] #homeWineryPreview .winery-card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, rgba(0,0,0,.62) 0%, rgba(0,0,0,.24) 36%, rgba(0,0,0,.10) 62%, rgba(0,0,0,.48) 100%);
  pointer-events: none;
}

body[data-page="home"] #homeWineryPreview .card-image-link {
  position: absolute;
  inset: 0;
  margin: 0;
}

body[data-page="home"] #homeWineryPreview .winery-card img {
  width: 100%;
  height: 100%;
  aspect-ratio: auto;
  object-fit: cover;
}

body[data-page="home"] #homeWineryPreview .winery-card h3,
body[data-page="home"] #homeWineryPreview .winery-card .meta,
body[data-page="home"] #homeWineryPreview .winery-card > p:not(.meta) {
  position: relative;
  z-index: 2;
  margin-left: 28px;
  margin-right: 28px;
}

body[data-page="home"] #homeWineryPreview .winery-card h3 {
  margin-top: 28px;
  margin-bottom: 5px;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 34px;
  font-weight: 400;
}

body[data-page="home"] #homeWineryPreview .winery-card h3 a,
body[data-page="home"] #homeWineryPreview .winery-card h3 a:visited {
  color: white;
}

body[data-page="home"] #homeWineryPreview .winery-card .meta {
  margin-top: 0;
  color: rgba(255,255,255,.84);
}

body[data-page="home"] #homeWineryPreview .winery-card > p:not(.meta) {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 24px;
  margin-bottom: 0;
  color: rgba(255,255,255,.9);
}

body[data-page="home"] #homeWineryPreview .winery-card .card-actions {
  display: none;
}

/* Refined trade login modal for the photography-led homepage. */
body[data-page="home"] .login-modal {
  width: min(460px, calc(100vw - 32px));
  padding: 0;
  border: 0;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 28px 80px rgba(0,0,0,.24);
  overflow: hidden;
}

body[data-page="home"] .login-modal::backdrop {
  background: rgba(18,18,18,.48);
  backdrop-filter: blur(4px);
}

body[data-page="home"] .login-modal form {
  padding: 38px 36px 34px;
}

body[data-page="home"] .login-modal h2 {
  margin: 0 40px 12px 0;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 38px;
  font-weight: 400;
  letter-spacing: -.03em;
}

body[data-page="home"] .login-modal form > p:not(.trade-login-help):not(.form-result) {
  margin: 0 0 26px;
  color: var(--soft-text);
  font-size: 15px;
  line-height: 1.55;
}

body[data-page="home"] .login-modal label {
  display: grid;
  gap: 9px;
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .04em;
}

body[data-page="home"] .login-modal input[type="password"] {
  width: 100%;
  min-height: 54px;
  padding: 14px 16px;
  border: 1px solid #cfc8be;
  border-radius: 10px;
  outline: none;
  background: #faf9f7;
  color: var(--text);
  font-size: 17px;
  letter-spacing: .08em;
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}

body[data-page="home"] .login-modal input[type="password"]:hover {
  border-color: #a9a096;
  background: #fff;
}

body[data-page="home"] .login-modal input[type="password"]:focus {
  border-color: var(--accent);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(123,31,42,.10);
}

body[data-page="home"] .trade-login-help {
  margin: 14px 0 24px;
  color: var(--soft-text);
  font-size: 13px;
  line-height: 1.5;
}

body[data-page="home"] .trade-login-help a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid rgba(123,31,42,.35);
}

body[data-page="home"] .login-modal .button.primary {
  width: 100%;
  min-height: 50px;
  border: 1px solid var(--accent);
  border-radius: 10px;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  letter-spacing: .02em;
}

body[data-page="home"] .login-modal .button.primary:hover {
  background: #641923;
  border-color: #641923;
}

body[data-page="home"] .login-modal .modal-close {
  top: 18px;
  right: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: 50%;
  background: #f3f0eb;
  color: #504b45;
  font-size: 22px;
  line-height: 1;
}

body[data-page="home"] .login-modal .modal-close:hover {
  background: #e9e4dd;
  color: var(--text);
}

body[data-page="home"] .login-modal .form-result {
  margin-top: 12px;
  min-height: 0;
  font-size: 13px;
}

@media (max-width: 850px) {
  body[data-page="home"] #homeWinePreview {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body[data-page="home"] .section-heading {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  body[data-page="home"] .hero {
    min-height: 58vh;
    padding-bottom: 36px;
  }

  body[data-page="home"] .hero-copy {
    padding-top: 70px;
  }

  body[data-page="home"] .hero h1 {
    font-size: clamp(40px, 12vw, 58px);
    line-height: 1;
  }

  body[data-page="home"] #homeWinePreview,
  body[data-page="home"] #homeWineryPreview {
    grid-template-columns: 1fr;
  }

  body[data-page="home"] #homeWineryPreview .winery-card {
    min-height: 360px;
  }

  body[data-page="home"] #homeWineryPreview .winery-card h3 {
    margin-top: 24px;
    font-size: 30px;
  }

  body[data-page="home"] #homeWineryPreview .winery-card h3,
  body[data-page="home"] #homeWineryPreview .winery-card .meta,
  body[data-page="home"] #homeWineryPreview .winery-card > p:not(.meta) {
    margin-left: 22px;
    margin-right: 22px;
  }

  body[data-page="home"] .login-modal form {
    padding: 32px 24px 26px;
  }

  body[data-page="home"] .login-modal h2 {
    font-size: 32px;
  }
}
