/*
  styles.css — all the visual styling for Beautiful Things By Elizabeth.
  The look is "traditional & European": classic serif fonts, a warm
  cream/charcoal palette with a soft gold accent, and generous whitespace.

  The file is grouped into labeled sections so you can find things:
    1. Color & font variables   4. Hero
    2. Global base styles        5. About
    3. Header / nav              6. Gallery
                                 7. Contact
                                 8. Footer
                                 9. Buttons & shared bits
                                10. Responsive (small screens)
*/

/* ============================================================
   1. COLOR & FONT VARIABLES
   These "--name" values are defined once here, then reused below
   with var(--name). Change a color in one place, it updates everywhere.
   ============================================================ */
:root {
  --cream: #f5f1e8;      /* page background */
  --ivory: #efe9dc;      /* slightly darker panels */
  --charcoal: #2f2b26;   /* main text color */
  --muted: #6f665a;      /* softer secondary text */
  --gold: #a8905a;       /* the single accent color */
  --line: #d8cfbd;       /* thin divider lines */

  --font-heading: "Cormorant Garamond", Georgia, serif;
  --font-body: "EB Garamond", Georgia, serif;
}

/* ============================================================
   2. GLOBAL BASE STYLES
   ============================================================ */

/* box-sizing:border-box makes width/padding math predictable */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth; /* nav links glide down instead of jumping */
}

body {
  background-color: var(--cream);
  color: var(--charcoal);
  font-family: var(--font-body);
  font-size: 19px;
  line-height: 1.7;
}

h1, h2 {
  font-family: var(--font-heading);
  font-weight: 500;
  line-height: 1.15;
}

img {
  display: block;
  max-width: 100%; /* images never overflow their container */
}

/* A small-caps label used above section headings (the "boutique" touch) */
.section-label,
.eyebrow {
  font-family: var(--font-body);
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: 0.72em;
  color: var(--gold);
  margin-bottom: 0.8rem;
}

.centered {
  text-align: center;
}

/* ============================================================
   3. HEADER / NAV
   ============================================================ */
.site-header {
  display: flex;                 /* lays children out in a row */
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.5rem 2.5rem;
  border-bottom: 1px solid var(--line);
  position: sticky;              /* header stays at top while scrolling */
  top: 0;
  background-color: var(--cream);
  z-index: 10;
}

.brand {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  color: var(--charcoal);
  text-decoration: none;
  letter-spacing: 0.02em;
}

.brand span {
  font-style: italic;
  color: var(--muted);
}

.nav-links {
  display: flex;
  gap: 2rem;
}

.nav-links a {
  color: var(--charcoal);
  text-decoration: none;
  letter-spacing: 0.04em;
}

.nav-links a:hover {
  color: var(--gold);
}

/* ============================================================
   4. HERO
   ============================================================ */
.hero {
  text-align: center;
  padding: 7rem 1.5rem 6rem;
  max-width: 800px;
  margin: 0 auto;
}

.hero-title {
  font-size: 4rem;
  margin-bottom: 1.2rem;
}

.hero-tagline {
  font-size: 1.4rem;
  font-style: italic;
  color: var(--muted);
  margin-bottom: 2.5rem;
}

/* ============================================================
   5. ABOUT
   Two columns: image on the left, text on the right (via flexbox).
   ============================================================ */
.about {
  display: flex;
  align-items: center;
  gap: 4rem;
  max-width: 1000px;
  margin: 0 auto;
  padding: 5rem 2.5rem;
}

.about-image {
  flex: 0 0 42%; /* image column takes ~42% and doesn't shrink */
}

.about-image img {
  width: 100%;
}

.about-text h2 {
  font-size: 2.4rem;
  margin-bottom: 1.2rem;
}

.about-text p {
  margin-bottom: 1rem;
  color: var(--muted);
}

/* ============================================================
   6. GALLERY
   ============================================================ */
.gallery {
  max-width: 1100px;
  margin: 0 auto;
  padding: 4rem 2.5rem 5rem;
}

.gallery h2 {
  font-size: 2.4rem;
  margin-bottom: 2.5rem;
}

/*
  CSS Grid: auto-fit + minmax means "fit as many columns as will hold at
  least 300px each, and stretch them to fill." Fewer columns on narrow
  screens, more on wide ones — no media query needed for the grid itself.
*/
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}

.gallery-grid img {
  width: 100%;
  border: 1px solid var(--line);
}

/* ============================================================
   7. CONTACT
   ============================================================ */
.contact {
  background-color: var(--ivory);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  text-align: center;
  padding: 5rem 1.5rem;
}

.contact h2 {
  font-size: 2.6rem;
  margin-bottom: 1.2rem;
}

.contact-intro {
  max-width: 520px;
  margin: 0 auto 2.5rem;
  color: var(--muted);
  font-size: 1.2rem;
}

/*
  The form is a narrow centered column. "text-align:left" undoes the section's
  centering so the labels sit above their boxes on the left, which reads better.
*/
.contact-form {
  max-width: 520px;
  margin: 0 auto;
  text-align: left;
}

/* Each label wraps its input, stacked vertically with a little breathing room */
.contact-form label {
  display: block;
  margin-bottom: 1.4rem;
  letter-spacing: 0.05em;
  color: var(--muted);
}

.contact-form input,
.contact-form textarea {
  display: block;
  width: 100%;
  margin-top: 0.4rem;
  padding: 0.7rem 0.9rem;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--charcoal);
  background-color: var(--cream);
  border: 1px solid var(--line);
}

.contact-form textarea {
  resize: vertical; /* visitor can drag to make the message box taller only */
}

/* Gold outline when a box is focused (clicked into) */
.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--gold);
}

/* The submit button is a <button>, so give it a pointer cursor + full width */
.contact-form .button {
  cursor: pointer;
  width: 100%;
}

/* ============================================================
   8. FOOTER
   ============================================================ */
.site-footer {
  text-align: center;
  padding: 3rem 1.5rem;
  color: var(--muted);
}

.site-footer p:first-child {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  color: var(--charcoal);
}

.fine-print {
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: 0.7rem;
  margin-top: 0.4rem;
}

/* ============================================================
   9. BUTTONS & SHARED BITS
   ============================================================ */
.button {
  display: inline-block;
  background-color: var(--gold);
  color: var(--cream);
  text-decoration: none;
  padding: 0.85rem 2.2rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.8rem;
  border: 1px solid var(--gold);
  transition: background-color 0.2s, color 0.2s; /* smooth hover fade */
}

.button:hover {
  background-color: transparent;
  color: var(--gold);
}

/* ============================================================
   10. RESPONSIVE — SMALL SCREENS
   A "media query" applies these rules only when the screen is 760px
   wide or less (phones / small tablets), so the layout stacks neatly.
   ============================================================ */
@media (max-width: 760px) {
  .site-header {
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
  }

  .hero-title {
    font-size: 2.8rem;
  }

  /* About stacks image over text instead of side-by-side */
  .about {
    flex-direction: column;
    gap: 2rem;
    padding: 3rem 1.5rem;
    text-align: center;
  }

  .about-image {
    flex: 1 1 auto;
    max-width: 340px;
  }
}
