/* ---------- 0. CSS Variables ---------- */
:root {
  --main-font: 'Fournier', Times, serif;
  --text-color: #111;
  --bg-color: #fff;
  --gap-desktop: 1rem;
  --gap-mobile: 0.5rem;
  --newsletter-min-width: 95px;
  --newsletter-max-width: 300px;
  --newsletter-font-size: 1.5rem;
  --caption-font-size-desktop: 1.2rem;
  --caption-font-size-mobile: 1.15rem;
  --caption-max-width-desktop: 890px;
  --caption-max-width-mobile: 95vw;
  --container-max-width: 800px;
}

/* ---------- 1. Font Definitions ---------- */
@font-face {
  font-family: 'Fournier';
  src: url('fonts/FournierMA-Regular.woff2') format('woff2'),
       url('fonts/FournierMA-Regular.woff') format('woff');
  font-weight: normal;
  font-style: normal;
}
@font-face {
  font-family: 'Fournier';
  src: url('fonts/FournierMA-Italic.woff2') format('woff2'),
       url('fonts/FournierMA-Italic.woff') format('woff');
  font-weight: normal;
  font-style: italic;
}

/* ---------- 2. Base Reset ---------- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* ---------- 3. Body Styling ---------- */
body {
  font-family: var(--main-font);
  font-weight: normal;
  letter-spacing: 0.05em;
  line-height: 1.2;
  color: var(--text-color);
  background-color: var(--bg-color);
  padding: 0;
}

/* ---------- 4. Layout ---------- */
.container {
  max-width: var(--container-max-width);
  margin-left: 0;
  margin-right: auto;
  padding-top: 1.2rem;
  padding-left: 1.5rem;
}

/* ---------- 5. Header ---------- */
header {
  font-weight: normal;
  margin-bottom: 1.5rem;
}
h1, h2 {
  font-size: 1.5rem;
  font-weight: normal;
}
header h1 { margin-bottom: 1.5rem; }
header p { font-size: 1.5rem; color: var(--text-color); }

/* ---------- 6. Sections ---------- */
section {
  font-size: 1.5rem;
  font-weight: normal;
  margin-bottom: 2rem;
  color: var(--text-color);
}
section h2 { margin-bottom: 2rem; }

ul { list-style: none; padding-left: 0; }
ul li { margin-bottom: 0.3rem; }

/* ---------- 7. Links ---------- */
a {
  color: var(--text-color);
  text-decoration: none;
}
a:hover { text-decoration: underline; }

/* ---------- 8. Newsletter Form ---------- */
.newsletter-inline {
  display: inline-flex;
  align-items: center;
  gap: var(--gap-desktop);
  flex-wrap: nowrap;
  font-family: var(--main-font);
  font-size: var(--newsletter-font-size);
  font-weight: normal;
  line-height: 1.2;
}

.newsletter-inline .newsletter-label {
  white-space: nowrap;
  font-family: var(--main-font);
}

/* ---------- CSS Variables ---------- */
:root {
  --newsletter-min-width: 90px;    /* starting width of input */
  --newsletter-max-width: 300px;   /* maximum width of input */
  --newsletter-font-size: 1.5rem;  /* font size */
  --main-font: 'Fournier', Times, serif;
  --text-color: #111;
}

/* ---------- Base Styling ---------- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--main-font);
  color: var(--text-color);
  background-color: #fff;
  line-height: 1.2;
  font-weight: normal;
}

/* ---------- Newsletter Form ---------- */
.newsletter-inline {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: nowrap;
  font-family: var(--main-font);
  font-size: var(--newsletter-font-size);
  font-weight: normal;
}

.newsletter-inline .newsletter-label {
  white-space: nowrap;
  font-family: var(--main-font);
  font-size: var(--newsletter-font-size);
}

/* ---------- Newsletter Form ---------- */
.newsletter-inline {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: nowrap;
  font-family: 'Fournier', Times, serif;
  font-size: 1.5rem;
  font-weight: normal;
  line-height: 1.2;
}

.newsletter-inline .newsletter-label {
  white-space: nowrap;
  font-family: 'Fournier', Times, serif;
  font-size: 1.5rem;
  font-weight: normal;
}

.newsletter-inline input[type="email"] {
  border: none;
  border-bottom: 1px solid #111;
  background: none;
  padding: 0.1rem 0;
  min-width: 95px;        /* starting minimum width */
  flex: 0 1 auto;         /* keeps small width, grows only if needed */
  max-width: 300px;       /* optional maximum width */
  font-family: 'Fournier', Times, serif;
  font-size: 1.5rem;
  font-weight: normal;
  color: #111;
  width: auto;
}

.newsletter-inline input[type="email"]:focus {
  outline: none;
  border-bottom: 1px solid #333;
}

.newsletter-inline button {
  background: none;
  border: none;
  text-decoration: none;
  cursor: pointer;
  padding: 0;
  font-family: 'Fournier', Times, serif;
  font-size: 1.5rem;
  font-weight: normal;
  color: #111;
}

.newsletter-inline button:hover {
  text-decoration: underline;
}

.newsletter-inline span.form-message {
  margin-left: 0.5rem;
  font-style: italic;
  color: green;
  white-space: nowrap;
}

}

/* ---------- Mobile Adjustments ---------- */
@media (max-width: 600px) {
  .newsletter-inline {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.3rem;
    font-size: calc(var(--newsletter-font-size) * 0.77);
  }

  .newsletter-inline input[type="email"] {
    min-width: 86px;
    max-width: 100%;
    width: 86px;
  }
}


.newsletter-inline input[type="email"]:focus {
  outline: none;
  border-bottom: 1px solid #333;
}

.newsletter-inline button {
  background: none;
  border: none;
  text-decoration: none;
  cursor: pointer;
  padding: 0;
  font-family: var(--main-font);
  font-size: var(--newsletter-font-size);
  font-weight: normal;
  color: var(--text-color);
}

.newsletter-inline button:hover {
  text-decoration: underline;
}

.newsletter-inline span.form-message {
  margin-left: 0.5rem;
  font-style: italic;
  color: green;
  white-space: nowrap;
}

/* ---------- 9. Gallery Pages ---------- */
.gallery-page {
  max-width: 75vw;
  margin-left: 0;
  padding: 1rem;
}

.gallery {
  display: flex;
  flex-direction: column;
  gap: var(--gap-desktop);
}

.gallery figure { margin: 0; }

.gallery img {
  width: 100%;
  height: auto;
  display: block;
  max-height: 700px;
  max-width: 900px;
  object-fit: contain;
  object-position: left top;
}

.gallery figcaption {
  font-size: var(--caption-font-size-desktop);
  font-weight: normal;
  color: var(--text-color);
  margin-top: 0.25rem;
  max-width: var(--caption-max-width-desktop);
  line-height: 1.2;
}

/* ---------- 10. Responsive / Mobile ---------- */
@media (max-width: 600px) {
  :root {
    --gap-desktop: var(--gap-mobile);
  }

  body {
    font-size: 1.15rem;
    letter-spacing: 0.03em;
    line-height: 1.2;
    padding-right: 1.2rem;
  }

  header h1, header p, section h2, section {
    font-size: 1.15rem;
  }

  .newsletter-inline {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.3rem;
    font-size: 1.15rem;
  }

  .newsletter-inline .newsletter-label,
  .newsletter-inline input[type="email"],
  .newsletter-inline button {
    font-size: 1.15rem;
    line-height: 1.2;
  }

  .newsletter-inline input[type="email"] {
    min-width: 86px;
    max-width: 100%;
    width: 95px;
  }

  .newsletter-inline span.form-message {
    margin-left: 0;
    margin-top: 0.3rem;
  }

  .newsletter-inline input::placeholder { color: #888; }

  .gallery-page { max-width: 98vw; }

  .gallery { gap: var(--gap-mobile); }

  .gallery figcaption {
    max-width: var(--caption-max-width-mobile);
    font-size: var(--caption-font-size-mobile);
    line-height: 1.15;
  }
}
