/* =========================================================
   BBR GOLF — BEGINNER WEBSITE STYLESHEET
   Link this file inside every HTML page with:
   <link rel="stylesheet" href="styles.css">

   BEGINNER TIP:
   Change the colors in :root below to recolor the entire site.
   ========================================================= */

:root {
  /* Colors inspired by the BBR Golf badge */
  --pine-dark: #003f2d;
  --pine: #07583d;
  --fairway: #87a94f;
  --gold: #f8c53a;
  --sky: #82c5e3;
  --cream: #fff4d6;
  --white: #ffffff;
  --ink: #17352b;
  --muted: #5d6f67;
  --border: #d8dfd9;

  /* Reusable design settings */
  --content-width: 1120px;
  --radius: 14px;
  --shadow: 0 12px 30px rgb(0 63 45 / 14%);
}

/* ---------- Basic page setup ---------- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--cream);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 18px;
  line-height: 1.6;
}

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

a {
  color: var(--pine);
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--pine-dark);
}

h1,
h2,
h3 {
  margin-top: 0;
  color: var(--pine-dark);
  line-height: 1.15;
}

h1 {
  font-size: clamp(2.4rem, 7vw, 4.75rem);
}

h2 {
  font-size: clamp(1.8rem, 4vw, 2.75rem);
}

h3 {
  font-size: 1.35rem;
}

p {
  margin-top: 0;
}

.container {
  width: min(100% - 40px, var(--content-width));
  margin-inline: auto;
}

/* ---------- Header and navigation ---------- */

.site-header {
  position: sticky;
  z-index: 10;
  top: 0;
  color: var(--white);
  background: var(--pine-dark);
  border-bottom: 4px solid var(--gold);
}

.header-inner {
  display: flex;
  gap: 28px;
  align-items: center;
  justify-content: space-between;
  min-height: 84px;
}

.site-logo {
  display: inline-flex;
  gap: 12px;
  align-items: center;
  color: var(--white);
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-decoration: none;
}

.site-logo img {
  width: 62px;
  height: 62px;
  object-fit: contain;
}

.main-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}

.main-nav a {
  padding: 10px 14px;
  color: var(--white);
  border-radius: 999px;
  font-weight: 700;
  text-decoration: none;
}

.main-nav a:hover,
.main-nav a[aria-current="page"] {
  color: var(--pine-dark);
  background: var(--gold);
}

/* ---------- Hero area ---------- */

.hero {
  display: grid;
  min-height: 560px;
  place-items: center;
  padding: 90px 0;
  text-align: center;
  background:
    linear-gradient(rgb(255 244 214 / 82%), rgb(255 244 214 / 94%)),
    var(--sky);
}

.hero-content {
  max-width: 780px;
}

.eyebrow {
  margin-bottom: 12px;
  color: var(--pine);
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero p {
  max-width: 680px;
  margin-right: auto;
  margin-bottom: 28px;
  margin-left: auto;
  color: var(--muted);
  font-size: 1.2rem;
}

/* ---------- Buttons ---------- */

.button-group {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: center;
}

.button,
button {
  display: inline-block;
  padding: 13px 22px;
  color: var(--pine-dark);
  background: var(--gold);
  border: 2px solid var(--gold);
  border-radius: 999px;
  cursor: pointer;
  font: inherit;
  font-weight: 800;
  text-decoration: none;
}

.button:hover,
button:hover {
  color: var(--white);
  background: var(--pine);
  border-color: var(--pine);
}

.button-secondary {
  color: var(--pine-dark);
  background: transparent;
  border-color: var(--pine-dark);
}

/* ---------- Main sections and cards ---------- */

main section {
  padding: 72px 0;
}

.section-light {
  background: var(--white);
}

.section-green {
  color: var(--white);
  background: var(--pine);
}

.section-green h2,
.section-green h3,
.section-green a {
  color: var(--white);
}

.section-heading {
  max-width: 720px;
  margin-bottom: 34px;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.card {
  padding: 26px;
  background: var(--white);
  border: 1px solid var(--border);
  border-top: 6px solid var(--gold);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.card p:last-child {
  margin-bottom: 0;
}

/* ---------- Interior page heading ---------- */

.page-banner {
  padding: 70px 0;
  color: var(--white);
  background: var(--pine);
  border-bottom: 8px solid var(--gold);
}

.page-banner h1,
.page-banner p {
  max-width: 760px;
  color: var(--white);
}

/* ---------- Contact form ---------- */

.contact-layout {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 48px;
  align-items: start;
}

.contact-form {
  padding: 30px;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.form-row {
  margin-bottom: 20px;
}

label {
  display: block;
  margin-bottom: 7px;
  color: var(--pine-dark);
  font-weight: 800;
}

input,
textarea,
select {
  width: 100%;
  padding: 13px 14px;
  color: var(--ink);
  background: var(--white);
  border: 2px solid var(--border);
  border-radius: 8px;
  font: inherit;
}

textarea {
  min-height: 170px;
  resize: vertical;
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--pine);
  outline: 4px solid rgb(7 88 61 / 16%);
}

/* ---------- Footer ---------- */

.site-footer {
  padding: 34px 0;
  color: var(--cream);
  background: var(--pine-dark);
  border-top: 5px solid var(--gold);
}

.site-footer a {
  color: var(--gold);
}

.site-footer p:last-child {
  margin-bottom: 0;
}

/* Make keyboard navigation easy to see. */
a:focus-visible,
button:focus-visible {
  outline: 4px solid var(--sky);
  outline-offset: 4px;
}

/* ---------- Phones and smaller screens ---------- */

@media (max-width: 760px) {
  body {
    font-size: 17px;
  }

  .header-inner {
    display: block;
    padding: 16px 0;
  }

  .main-nav {
    justify-content: flex-start;
    margin-top: 12px;
  }

  .main-nav a {
    padding: 8px 10px;
  }

  .hero {
    min-height: auto;
    padding: 70px 0;
    text-align: left;
  }

  .hero p {
    margin-left: 0;
  }

  .button-group {
    justify-content: flex-start;
  }

  .card-grid,
  .contact-layout {
    grid-template-columns: 1fr;
  }

  main section {
    padding: 54px 0;
  }
}

/* Respect visitors who prefer less animation. */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
