/* ========================================
   Domaine des Restanques - styles.css
   ======================================== */

:root {
  --stone: #F2EEE3;
  --stone-light: #EAE3D3;
  --white: #FBF8F1;
  --wine: #5C2A35;
  --straw: #C4A05A;
  --garrigue: #7A8464;
  --ink: #332E28;
  --ink-soft: #6B6155;

  --font-display: "Zilla Slab", Georgia, serif;
  --font-body: "Karla", system-ui, sans-serif;

  --header-height: 72px;
  --container-max: 1120px;
  --section-padding: 5rem 1.5rem;
}

/* Reset & base */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 1rem;
  line-height: 1.65;
  color: var(--ink);
  background-color: var(--stone);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: 0;
}

a {
  color: var(--wine);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  color: var(--straw);
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.2;
  color: var(--ink);
  text-wrap: balance;
}

h1 {
  font-size: clamp(2rem, 5vw, 3.25rem);
  font-weight: 700;
}

h2 {
  font-size: clamp(1.625rem, 3.5vw, 2.375rem);
  font-weight: 600;
}

h3 {
  font-size: clamp(1.25rem, 2.5vw, 1.5rem);
}

p {
  max-width: 65ch;
}

/* Focus visible */
:focus {
  outline: none;
}

:focus-visible {
  outline: 2px solid var(--wine);
  outline-offset: 3px;
}

/* Container */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: 1.5rem;
}

/* ========================================
   Header
   ======================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: var(--white);
  border-bottom: 1px solid var(--stone-light);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--header-height);
  gap: 1rem;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  color: var(--wine);
  text-decoration: none;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.logo-image {
  width: 40px;
  height: 40px;
  object-fit: contain;
  flex-shrink: 0;
}

.logo:hover {
  color: var(--wine);
  text-decoration: none;
}

.logo:focus-visible {
  outline-offset: 4px;
}

/* Navigation */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 10px;
  background: transparent;
  border: 1px solid var(--stone-light);
  cursor: pointer;
  border-radius: 0;
}

.nav-toggle-bar {
  display: block;
  width: 100%;
  height: 2px;
  background-color: var(--wine);
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

@media (prefers-reduced-motion: reduce) {
  .nav-toggle-bar {
    transition: none;
  }
}

.main-nav ul {
  display: flex;
  align-items: center;
  gap: 0.25rem 1.75rem;
  list-style: none;
}

.main-nav a {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.9375rem;
  color: var(--ink);
  text-decoration: none;
  padding: 0.5rem 0.25rem;
  display: inline-block;
}

.main-nav a:hover,
.main-nav a[aria-current="page"] {
  color: var(--wine);
  text-decoration: underline;
  text-decoration-color: var(--straw);
}

@media (max-width: 768px) {
  .nav-toggle {
    display: flex;
  }

  .main-nav {
    position: absolute;
    top: var(--header-height);
    left: 0;
    right: 0;
    background-color: var(--white);
    border-bottom: 1px solid var(--stone-light);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
  }

  .main-nav.is-open {
    max-height: 320px;
  }

  @media (prefers-reduced-motion: reduce) {
    .main-nav {
      transition: none;
    }
  }

  .main-nav ul {
    flex-direction: column;
    align-items: stretch;
    padding: 1rem 1.5rem 1.5rem;
    gap: 0;
  }

  .main-nav li {
    border-bottom: 1px solid var(--stone-light);
  }

  .main-nav li:last-child {
    border-bottom: none;
  }

  .main-nav a {
    padding: 0.875rem 0.5rem;
    width: 100%;
  }
}

/* ========================================
   Buttons
   ======================================== */

.btn {
  display: inline-block;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.9375rem;
  padding: 0.875rem 1.75rem;
  border: 2px solid transparent;
  border-radius: 0;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

@media (prefers-reduced-motion: reduce) {
  .btn {
    transition: none;
  }
}

.btn-primary {
  background-color: var(--wine);
  color: var(--white);
  border-color: var(--wine);
}

.btn-primary:hover {
  background-color: var(--ink);
  border-color: var(--ink);
  color: var(--white);
  text-decoration: none;
}

.btn-secondary {
  background-color: transparent;
  color: var(--wine);
  border-color: var(--wine);
}

.btn-secondary:hover {
  background-color: var(--wine);
  color: var(--white);
  text-decoration: none;
}

/* ========================================
   Restanque separator
   ======================================== */

.restanque-separator {
  width: 100%;
  height: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
}

.restanque-separator span {
  display: block;
  height: 5px;
  background: linear-gradient(90deg, var(--wine) 0%, var(--straw) 100%);
  border-radius: 0;
}

.restanque-separator span:nth-child(1) {
  width: 100%;
  margin-left: 0;
}

.restanque-separator span:nth-child(2) {
  width: 88%;
  margin-left: 6%;
}

.restanque-separator span:nth-child(3) {
  width: 72%;
  margin-left: 14%;
}

.restanque-separator span:nth-child(4) {
  width: 94%;
  margin-left: 3%;
}

/* ========================================
   Sections
   ======================================== */

main {
  flex: 1;
}

.section {
  padding: var(--section-padding);
}

.section-alt {
  background-color: var(--stone-light);
}

.section-title {
  margin-bottom: 2.5rem;
}

.section-title p {
  margin-top: 0.75rem;
  color: var(--ink-soft);
  font-size: 1.0625rem;
}

.eyebrow {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.8125rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--garrigue);
  margin-bottom: 1rem;
}

/* ========================================
   Hero
   ======================================== */

.hero {
  min-height: 620px;
  padding: 0;
  background-color: var(--stone);
  background-image: linear-gradient(90deg, var(--stone) 0%, rgba(242, 238, 227, 0.85) 35%, rgba(242, 238, 227, 0.25) 65%, transparent 100%), url('images/hero.jpg');
  background-size: cover;
  background-position: center;
}

.hero-content {
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: 1.5rem;
  padding-top: 6rem;
  padding-bottom: 2.5rem;
}

.hero h1 {
  max-width: 18ch;
  margin-bottom: 1.25rem;
}

.hero-subtitle {
  font-size: clamp(1.0625rem, 2vw, 1.1875rem);
  color: var(--ink-soft);
  max-width: 52ch;
  margin-bottom: 2rem;
}

/* ========================================
   Timeline
   ======================================== */

.timeline {
  position: relative;
  padding-left: 2rem;
  max-width: 720px;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.5rem;
  bottom: 0.5rem;
  width: 2px;
  background: linear-gradient(180deg, var(--wine), var(--straw));
}

.timeline-item {
  position: relative;
  padding-bottom: 2.5rem;
}

.timeline-item:last-child {
  padding-bottom: 0;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: calc(-2rem - 5px);
  top: 0.45rem;
  width: 12px;
  height: 12px;
  background-color: var(--white);
  border: 2px solid var(--wine);
  border-radius: 0;
}

.timeline-date {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.125rem;
  color: var(--wine);
  margin-bottom: 0.5rem;
  display: block;
}

.timeline-item p {
  color: var(--ink-soft);
}

/* Domaine layout */
.domaine-layout {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

.domaine-image {
  width: 100%;
  height: 320px;
  object-fit: cover;
}

@media (max-width: 899px) {
  .domaine-image {
    order: -1;
  }
}

@media (min-width: 900px) {
  .domaine-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: start;
  }

  .domaine-layout .timeline {
    max-width: none;
  }

  .domaine-image {
    height: 100%;
    min-height: 420px;
    max-height: 560px;
  }
}

/* ========================================
   Wine cards
   ======================================== */

.wine-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.wine-card {
  background-color: var(--white);
  padding: 2rem 1.75rem;
  border: 1px solid var(--stone-light);
  border-radius: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.wine-card-color {
  font-size: 0.8125rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--garrigue);
}

.wine-card-desc {
  font-size: 0.9375rem;
  color: var(--ink-soft);
  flex: 1;
}

.wine-card-link {
  font-weight: 600;
  font-size: 0.875rem;
  margin-top: 0.5rem;
}

.wine-card-image {
  width: 100%;
  height: 220px;
  object-fit: contain;
  margin-inline: auto;
  filter: drop-shadow(0 8px 12px rgba(51, 46, 40, 0.18));
  transition: transform 0.3s ease, filter 0.3s ease;
}

.wine-card:hover .wine-card-image {
  transform: translateY(-8px) scale(1.03);
  filter: drop-shadow(0 14px 18px rgba(51, 46, 40, 0.24));
}

/* Wine list page */
.wine-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  max-width: 800px;
}

.wine-list-item {
  background-color: var(--white);
  padding: 2rem 2.25rem;
  border: 1px solid var(--stone-light);
  border-radius: 0;
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 2rem;
  align-items: center;
}

.wine-list-image {
  width: 100%;
  max-width: 180px;
  height: 280px;
  object-fit: contain;
  margin-inline: auto;
  filter: drop-shadow(0 8px 12px rgba(51, 46, 40, 0.18));
  transition: transform 0.3s ease, filter 0.3s ease;
}

.wine-list-item:hover .wine-list-image {
  transform: translateY(-8px) scale(1.03);
  filter: drop-shadow(0 14px 18px rgba(51, 46, 40, 0.24));
}

.wine-list-body {
  min-width: 0;
}

.wine-list-item h2 {
  font-size: clamp(1.375rem, 2.5vw, 1.625rem);
  margin-bottom: 0.35rem;
}

.wine-list-meta {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--garrigue);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.75rem;
}

.wine-list-item p {
  color: var(--ink-soft);
}

/* ========================================
   Visit preview & page
   ======================================== */

.visit-preview {
  text-align: left;
}

.visit-preview p {
  margin-bottom: 1.75rem;
  color: var(--ink-soft);
  font-size: 1.0625rem;
}

.visit-preview-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  align-items: center;
}

.visit-preview-content p {
  margin-bottom: 1.75rem;
}

.visit-preview-image {
  width: 100%;
  height: 280px;
  object-fit: cover;
}

@media (max-width: 768px) {
  .visit-preview-layout {
    grid-template-columns: 1fr;
  }

  .visit-preview-image {
    order: -1;
    height: 240px;
  }
}

.info-list {
  list-style: none;
  max-width: 680px;
  margin-bottom: 2.5rem;
}

.info-list li {
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--stone-light);
}

.info-list li:first-child {
  padding-top: 0;
}

.info-list strong {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--wine);
  display: block;
  margin-bottom: 0.35rem;
}

.info-list p {
  color: var(--ink-soft);
  max-width: none;
}

/* ========================================
   Contact & forms
   ======================================== */

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 3rem;
  align-items: start;
}

.contact-details {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.contact-details dt {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--wine);
  margin-bottom: 0.25rem;
}

.contact-details dd {
  color: var(--ink-soft);
  margin-left: 0;
}

.contact-details a {
  color: var(--ink-soft);
}

.contact-details a:hover {
  color: var(--wine);
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  font-weight: 500;
  font-size: 0.875rem;
  margin-bottom: 0.4rem;
  color: var(--ink);
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 0.75rem 1rem;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--ink);
  background-color: var(--white);
  border: 1px solid var(--stone-light);
  border-radius: 0;
}

.form-group input:focus-visible,
.form-group textarea:focus-visible,
.form-group select:focus-visible {
  border-color: var(--wine);
}

.form-group textarea {
  min-height: 140px;
  resize: vertical;
}

.form-note {
  font-size: 0.8125rem;
  color: var(--ink-soft);
  margin-top: 0.75rem;
}

.form-section-title {
  margin-bottom: 1.5rem;
}

.reservation-form {
  max-width: 560px;
}

/* ========================================
   Page header (inner pages)
   ======================================== */

.page-header {
  padding: 4rem 1.5rem 3rem;
  background-color: var(--stone);
  border-bottom: 1px solid var(--stone-light);
}

.page-header .container {
  max-width: var(--container-max);
}

.page-header p {
  margin-top: 0.75rem;
  color: var(--ink-soft);
  font-size: 1.0625rem;
}

.page-feature-image {
  width: 100%;
  max-height: 400px;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  margin-top: 2rem;
}

.page-content {
  padding: 3.5rem 1.5rem 5rem;
}

.page-content .container {
  max-width: var(--container-max);
}

/* ========================================
   Footer
   ======================================== */

.site-footer {
  background-color: var(--white);
  border-top: 1px solid var(--stone-light);
  padding: 2.5rem 1.5rem;
  margin-top: auto;
}

.footer-inner {
  max-width: var(--container-max);
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.footer-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.footer-logo {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.0625rem;
  color: var(--wine);
  text-decoration: none;
}

.footer-logo:hover {
  color: var(--wine);
  text-decoration: none;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2rem;
  list-style: none;
}

.footer-links a {
  font-size: 0.875rem;
  color: var(--ink-soft);
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--wine);
  text-decoration: underline;
}

.footer-credit {
  font-size: 0.8125rem;
  color: var(--ink-soft);
  padding-top: 1rem;
  border-top: 1px solid var(--stone-light);
  line-height: 1.5;
}

.footer-credit strong {
  color: var(--ink);
  font-weight: 600;
}

/* ========================================
   Responsive
   ======================================== */

@media (max-width: 768px) {
  :root {
    --section-padding: 3.5rem 1.25rem;
  }

  .hero {
    min-height: 520px;
    background-image: linear-gradient(180deg, rgba(242, 238, 227, 0.9) 0%, rgba(242, 238, 227, 0.55) 45%, rgba(242, 238, 227, 0.15) 100%), url('images/hero.jpg');
  }

  .hero-content {
    padding-inline: 1.25rem;
    padding-top: 4rem;
    padding-bottom: 2rem;
  }

  .wine-grid {
    grid-template-columns: 1fr;
  }

  .contact-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .wine-list-item {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .wine-list-image {
    max-width: 200px;
    height: 240px;
  }

  .footer-top {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 480px) {
  :root {
    --section-padding: 3rem 1rem;
    --header-height: 64px;
  }

  .container,
  .hero-content,
  .page-header .container,
  .page-content .container {
    padding-inline: 1rem;
  }

  .hero-content {
    padding-inline: 1rem;
    padding-top: 3rem;
    padding-bottom: 1.75rem;
  }

  .wine-card,
  .wine-list-item {
    padding: 1.5rem 1.25rem;
  }

  .timeline {
    padding-left: 1.5rem;
  }

  .timeline-item::before {
    left: calc(-1.5rem - 5px);
  }
}
