/* ==========================================================================
   All Around the Vines – main stylesheet
   One file for the whole site. Search for the section numbers below.

   CONTENTS
   1.  Design tokens (colours, fonts, spacing)  <- change the look here first
   2.  Reset & base elements
   3.  Typography
   4.  Layout helpers (container, sections, two-column "split")
   5.  Buttons
   6.  Icons
   7.  Skip link
   8.  Top bar (email + phone)
   9.  Header & navigation (desktop + mobile slide-in menu)
   10. Banner image (top of every page)
   11. Home: intro video
   12. Home: service cards
   13. Home: testimonials
   14. Photo galleries
   15. Wine tours: tour cards
   16. Golf: course cards, course pages, "Nearby Courses"
   17. Contact page
   18. Call-to-action band
   19. Footer
   20. Legal pages
   21. Motion & print preferences

   BREAKPOINTS used in this file
     max-width: 1024px  tablet  (tighter padding)
     max-width: 767px   mobile  (columns stack, slide-in menu appears)
   ========================================================================== */


/* 1. DESIGN TOKENS ------------------------------------------------------- */
:root {
  /* Brand colours */
  --accent:       #3a004f;   /* dark purple: links, buttons, top bar */
  --ink:          #222222;   /* body text, headings, button hover */
  --muted:        #575760;   /* secondary text */
  --soft:         #edf2f4;   /* pale blue-grey bands */
  --paper:        #f7f8f9;   /* very light grey sections + footer */
  --green:        #7aad34;   /* footer bar, tick icons */
  --line:         #dcdfe3;   /* thin divider lines */
  --white:        #ffffff;

  /* Fonts. Georgia for headings and body text, with system fonts as
     fallbacks. No web fonts are downloaded, so text appears instantly. */
  --font-body:    Georgia, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-heading: Georgia, "Times New Roman", serif;

  /* Layout */
  --container:    1280px;          /* widest the page content area gets */
  --gutter:       40px;            /* left/right padding inside the container */
  --section-pad:  100px;           /* top/bottom padding of each section */
  --banner-height: 380px;          /* height of the photo banner on every page */
  --header-height: 110px;          /* logo + menu bar (shrinks a little when you scroll) */

  --radius: 5px;
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.09);
}

/* Tablet: tighter padding */
@media (max-width: 1024px) {
  :root { --gutter: 20px; --section-pad: 60px; }
}


/* 2. RESET & BASE -------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1rem;                 /* 16px */
  line-height: 1.55;
  color: var(--ink);
  background: var(--white);
}

img, video { display: block; max-width: 100%; height: auto; }

/* All text links: purple and bold, never underlined (hover/tap turns them dark) */
a { color: var(--accent); font-weight: 700; text-decoration: none; }
a:hover, a:focus { color: var(--ink); }

:focus-visible { outline: 3px solid var(--green); outline-offset: 3px; }

ul { padding-left: 1.5em; }
address { font-style: normal; }



/* 3. TYPOGRAPHY ---------------------------------------------------------- */
h1, h2, h3 {
  font-family: var(--font-heading);
  font-weight: 400;
  line-height: 1.2;
  color: var(--ink);
  margin: 0 0 0.5em;
}
h1 { font-size: 38px; }
h2 { font-size: 32px; }
h3 { font-size: 24px; }

p { margin: 0 0 1.5em; }


/* 4. LAYOUT HELPERS ------------------------------------------------------ */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { padding-block: var(--section-pad); }
.section--soft  { background: var(--soft); }
.section--paper { background: var(--paper); }
.text-center { text-align: center; }

/* Two columns: text on the left (60%), image or video on the right (40%) */
.split {
  display: grid;
  grid-template-columns: 3fr 2fr;
  column-gap: 60px;
  align-items: center;
}
.split__text { padding-right: 50px; }
.split img { width: 100%; }

@media (max-width: 1024px) {
  .split__text { padding-right: 0; }
}
@media (max-width: 767px) {
  .split { grid-template-columns: 1fr; row-gap: 40px; }
}

.actions { display: flex; flex-wrap: wrap; gap: 20px; }
.actions--center { justify-content: center; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}


/* 5. BUTTONS ------------------------------------------------------------- */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 15px 20px;
  background: var(--accent);
  color: var(--white);
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  font-weight: 500;
  line-height: 1.2;
  text-decoration: none;
  transition: background-color 0.2s, border-color 0.2s, color 0.2s;
}
.button:hover, .button:focus { background: var(--ink); border-color: var(--ink); color: var(--white); }

/* Second button next to the first one: white with a purple outline */
.button--outline { background: var(--white); color: var(--accent); }


/* 6. ICONS (inline SVG sprite at the top of every page, used with <use>) - */
.icon { width: 1em; height: 1em; fill: currentColor; flex: none; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }


/* 7. SKIP LINK (keyboard / screen-reader shortcut) ----------------------- */
.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 300;
  padding: 0.6rem 1rem;
  background: var(--white);
  color: var(--accent);
  border-radius: var(--radius);
}
.skip-link:focus { top: 0.5rem; }


/* 8. TOP BAR ------------------------------------------------------------- */
.topbar { background: var(--accent); color: var(--white); font-size: 15px; }
.topbar__inner {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 2.5rem;
  min-height: 54px;
}
.topbar a { display: inline-flex; align-items: center; gap: 0.7rem; color: var(--white); font-weight: 400; text-decoration: none; }
.topbar a:hover { text-decoration: underline; color: var(--white); }
.topbar .icon { width: 15px; height: 15px; }


/* 9. HEADER & NAVIGATION ------------------------------------------------- */
/* Sticks to the top of the screen while scrolling. The logo and bar stay the
   same size at all times (so the page never jumps); main.js only adds the class
   "is-compact" after a small scroll, which adds a thin shadow under the bar. */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--white);
}
.site-header.is-compact { box-shadow: 0 2px 2px -2px rgba(0, 0, 0, 0.25); }

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: var(--header-height);
}

.logo img { width: 190px; height: auto; }

/* Desktop menu */
.site-nav ul { display: flex; margin: 0; padding: 0; list-style: none; }
.site-nav a {
  display: block;
  padding: 0.5rem 16px;
  color: var(--accent);
  font-weight: 500;
  text-decoration: none;
}
.site-nav a:hover { text-decoration: underline; color: var(--accent); }
.site-nav a[aria-current="page"] { color: var(--ink); }     /* current page is dark */

/* "Menu" button and close "X" only appear on mobile */
.nav-toggle, .nav-close { display: none; }

@media (max-width: 767px) {
  .topbar { display: none; }                  /* phone + email are in the footer on mobile */
  :root { --header-height: 90px; }
  .logo img { width: 160px; }

  .nav-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.5rem;
    background: none;
    border: 0;
    font: inherit;
    font-weight: 500;
    color: var(--accent);
    cursor: pointer;
  }
  /* three-bar hamburger drawn with CSS */
  .nav-toggle__bars, .nav-toggle__bars::before, .nav-toggle__bars::after {
    display: block;
    width: 18px; height: 2px;
    background: currentColor;
  }
  .nav-toggle__bars { position: relative; }
  .nav-toggle__bars::before, .nav-toggle__bars::after { content: ""; position: absolute; left: 0; }
  .nav-toggle__bars::before { top: -6px; }
  .nav-toggle__bars::after  { top: 6px; }

  /* Dark overlay over the whole page while the menu is open */
  .site-header::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 1;
    background: rgba(0, 0, 0, 0.7);
    opacity: 0;
    visibility: hidden;
  }
  html.nav-open .site-header::before { opacity: 1; visibility: visible; }

  /* White slide-in panel from the right (opened by assets/js/main.js) */
  .site-nav {
    position: fixed;
    top: 0; right: 0; bottom: 0;
    z-index: 2;
    width: 67vw;
    max-width: 360px;
    padding: 4.5rem 1.5rem 1.5rem 2.5rem;
    background: var(--white);
    transform: translateX(100%);
    visibility: hidden;
    overflow-y: auto;
  }
  html.nav-open .site-nav { transform: none; visibility: visible; }

  /* The slide animation is only switched on once the page has finished loading
     (main.js adds "js-ready"). This stops the menu flashing/sliding while a new
     page is still loading, which showed up as a jump on phones. */
  html.js-ready .site-header::before { transition: opacity 0.25s, visibility 0.25s; }
  html.js-ready .site-nav { transition: transform 0.25s ease, visibility 0.25s; }

  .site-nav ul { flex-direction: column; }
  .site-nav a { padding: 1.9rem 0; font-size: 1.125rem; }

  /* Close "X" in the top-right corner of the white panel */
  .nav-close {
    display: block;
    position: absolute;
    top: 0.75rem;
    right: 0.5rem;
    width: 52px; height: 52px;
    background: none;
    border: 0;
    cursor: pointer;
  }
  .nav-close::before, .nav-close::after {
    content: "";
    position: absolute;
    left: 13px; right: 13px; top: 25px;
    height: 2px;
    background: var(--ink);
    transform: rotate(45deg);
  }
  .nav-close::after { transform: rotate(-45deg); }
}


/* 10. BANNER IMAGE ------------------------------------------------------- */
/* Photo banner under the header. Same height on every screen; the picture is
   cropped from the centre. To change a page's banner, change the <img src> in
   that page's HTML. */
.banner { height: var(--banner-height); overflow: hidden; background: var(--soft); }
.banner picture { display: block; height: 100%; }
.banner img { width: 100%; height: 100%; object-fit: cover; }


/* 11. HOME: INTRO VIDEO -------------------------------------------------- */
.home-title { font-weight: 600; margin-bottom: 16px; }
.lead { font-size: 28px; font-weight: 500; line-height: 1.3; }

.video {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;                 /* fills the frame, including the still image before play */
  background: #000;
}


/* 12. HOME: SERVICE CARDS ------------------------------------------------ */
.services { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; }
.service {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 30px 20px;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  text-align: center;
}
.service h2 { margin-bottom: 0.6em; }
.service p { margin-bottom: 20px; }
.service img { width: 100%; max-width: 290px; }

@media (max-width: 767px) { .services { grid-template-columns: 1fr; } }


/* 13. HOME: TESTIMONIALS ------------------------------------------------- */
.testimonials {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
  margin-top: 60px;
  align-items: start;
}
.testimonial {
  margin: 0;
  padding: 30px 20px 10px;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  text-align: center;
  font-size: 15px;
}
.testimonial blockquote { margin: 0; }
.testimonial figcaption { margin-bottom: 1.5em; font-weight: 700; }

@media (max-width: 767px) { .testimonials { grid-template-columns: 1fr; margin-top: 40px; } }


/* 14. PHOTO GALLERIES ---------------------------------------------------- */
/* Full-width strip of 4 photos with no gaps (home + wine tours) */
.gallery-bleed { display: grid; grid-template-columns: repeat(4, 1fr); }
.gallery-bleed img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }

/* 3 photos inside the text column (golf course pages) */
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 40px; }
.gallery img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }

@media (max-width: 767px) {
  .gallery-bleed { grid-template-columns: 1fr; }
  .gallery-bleed img { aspect-ratio: 1; }
  .gallery { grid-template-columns: 1fr; }
}


/* 15. WINE TOURS: TOUR CARDS --------------------------------------------- */
.tours { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; align-items: start; }
.tour { padding: 40px; background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); }
.tour h2 { font-size: 24px; margin-bottom: 40px; }     /* tour name */
.tour .tour__price { font-family: var(--font-heading); font-size: 32px; font-weight: 700; line-height: 1.2; margin-bottom: 25px; }
.tour .tour__price small { font-size: 24px; font-weight: 400; }
.tour .tour__time { font-size: 17px; margin-bottom: 25px; }
.tour p { font-size: 15px; }

.ticks { list-style: none; margin: 0 0 25px; padding: 0; font-size: 17px; }
.ticks li { position: relative; padding-left: 28px; margin-bottom: 15px; }
.ticks li::before {                /* green tick circle */
  content: "";
  position: absolute;
  left: 0; top: 0.2em;
  width: 18px; height: 18px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='11' fill='%237aad33'/%3E%3Cpath d='M7 12.5l3.2 3.2L17 9' fill='none' stroke='%23fff' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
}
.ticks li.ticks__links { padding-left: 0; font-size: 15px; }   /* link line under a tick item: no tick */
.ticks li.ticks__links::before { content: none; }

.footnotes { margin-top: 60px; font-size: 15px; }

@media (max-width: 1024px) { .tour { padding: 20px; } }
@media (max-width: 767px) { .tours { grid-template-columns: 1fr; } .footnotes { margin-top: 40px; } }


/* 16. GOLF: COURSE CARDS, COURSE PAGES, NEARBY COURSES ------------------- */
.courses { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; align-items: start; margin-top: 60px; }
.course { padding: 20px; background: #f9f9f9; border-radius: var(--radius); box-shadow: var(--shadow); font-size: 15px; }
.course img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; margin-bottom: 20px; }
.course h3 { font-size: 28px; margin-bottom: 0.4em; }
.course p { margin: 0; }

/* Course page: text on the left, "Nearby Courses" card on the right */
.course-layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; column-gap: 60px; align-items: start; }
.course-layout h1 { margin-bottom: 0.6em; }

.nearby { padding: 20px; background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); }
.nearby h2 { padding-bottom: 20px; margin-bottom: 20px; border-bottom: 1px solid var(--line); }
.nearby ul { list-style: none; margin: 0; padding: 0; }
.nearby li + li { margin-top: 25px; }
.nearby a { display: flex; align-items: center; gap: 25px; font-size: 15px; }
.nearby img { width: 75px; height: 75px; object-fit: cover; flex: none; }

@media (max-width: 1024px) {
  .courses { gap: 20px; }
  .course-layout { column-gap: 40px; grid-template-columns: minmax(0, 1fr) 300px; }
}
@media (max-width: 767px) {
  .courses { grid-template-columns: 1fr; margin-top: 40px; }
  .course-layout { grid-template-columns: 1fr; row-gap: 40px; }
}


/* 17. CONTACT PAGE ------------------------------------------------------- */
/* Heading + intro paragraph at the top of the page (left-aligned) */
.contact-intro { max-width: 760px; }

/* Two equal-height cards side by side (stacked on mobile) */
.contact-cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 40px; margin-top: 60px; }
.contact-card { padding: 40px; background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); }

/* Card heading: purple circle with the icon, then the title */
.contact-card h2 { display: flex; align-items: center; gap: 15px; font-size: 32px; margin-bottom: 0.8em; }
.contact-card h2 .icon { box-sizing: content-box; width: 22px; height: 22px; padding: 13px; border-radius: 50%; background: var(--accent); color: var(--white); }

/* The phone numbers / email address */
.contact-card__detail { font-family: var(--font-heading); font-size: 22px; font-weight: 700; margin-bottom: 1em; overflow-wrap: anywhere; }
.contact-card__detail span { font-weight: 400; }
.contact-card p:last-child { margin-bottom: 0; }

@media (max-width: 1024px) { .contact-card { padding: 30px 20px; } }
@media (max-width: 767px) {
  .contact-cards { grid-template-columns: 1fr; margin-top: 40px; }
  .contact-card__detail { font-size: 17px; }   /* keeps the email address on one line */
}


/* 18. CALL-TO-ACTION BAND (bottom of every page) ------------------------- */
.cta { background: var(--soft); padding-block: 50px; }
.cta__inner { display: grid; grid-template-columns: 3fr 1fr; align-items: center; justify-items: center; gap: 20px; }
.cta h2 { justify-self: start; font-size: 26px; margin: 0; }

@media (max-width: 767px) {
  .cta__inner { grid-template-columns: 1fr; text-align: center; }
  .cta h2 { justify-self: center; }
}


/* 19. FOOTER ------------------------------------------------------------- */
.site-footer { font-size: 15px; }

.footer__main { background: var(--paper); }
.footer__columns { display: grid; grid-template-columns: repeat(3, 1fr); padding-block: 80px; }
.footer__heading { font-size: 17px; font-weight: 700; margin-bottom: 1.4em; }
.footer__list { list-style: none; margin: 0; padding: 0; }
.footer__list li, .footer__contact p { margin-bottom: 1.6em; }

/* Partner logos band */
.footer__partners { background: var(--soft); padding-block: 40px; }
.footer__partners .container { display: flex; align-items: center; justify-content: space-between; gap: 40px; }
.footer__partners a:first-child img { width: 300px; }
.footer__partners a:last-child img { width: 260px; }

/* Green copyright bar */
.footer__bar { background: var(--green); }
.footer__bar .container { display: flex; align-items: center; justify-content: center; gap: 1rem; padding-block: 20px; }
.footer__bar p { margin: 0; }

@media (max-width: 767px) {
  .footer__columns { grid-template-columns: 1fr; row-gap: 40px; padding-block: 40px; }
  .footer__partners .container { flex-direction: column; gap: 40px; }
  .footer__bar .container { flex-direction: column; text-align: center; }
}


/* 20. LEGAL PAGES (terms, privacy) --------------------------------------- */
.legal { max-width: 960px; }          /* keeps long text easy to read */
.legal h2 { font-size: 30px; margin-top: 1.2em; }
.legal li { margin-bottom: 0.4em; }
.legal__updated { margin-top: 1.5em; }


/* 20b. MOBILE CONTACT BAR ------------------------------------------------- */
/* A slim Call / Email bar fixed to the bottom of the screen on phones.
   Hidden on tablets and desktops (they have the top bar). It sits below the
   header (z-index 100), so the open menu covers it. The body gets extra
   bottom padding so the bar never hides the end of the footer. */
.mobile-bar { display: none; }

@media (max-width: 767px) {
  body { padding-bottom: calc(72px + env(safe-area-inset-bottom)); }
  .mobile-bar {
    display: flex;
    gap: 10px;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 90;
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
    background: var(--white);
    border-top: 1px solid var(--line);
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.08);
  }
  .mobile-bar a {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    min-height: 48px;
    border: 2px solid var(--accent);
    border-radius: var(--radius);
    font-size: 18px;
    font-weight: 700;
    text-decoration: none;
  }
  .mobile-bar .icon { width: 18px; height: 18px; }
  .mobile-bar__call { background: var(--accent); color: var(--white); }
  .mobile-bar__email { background: var(--white); color: var(--accent); }
  .mobile-bar__call:hover, .mobile-bar__call:focus { background: var(--ink); border-color: var(--ink); color: var(--white); }
  .mobile-bar__email:hover, .mobile-bar__email:focus { background: var(--soft); color: var(--accent); }
}


/* 21. MOTION & PRINT ----------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; }
}

@media print {
  .topbar, .site-header, .cta, .footer__partners, .banner, .video, .mobile-bar { display: none; }
}
