/*! HTML5 Boilerplate v9.0.1 | MIT License | https://html5boilerplate.com/ */

/* main.css 3.0.0 | MIT License | https://github.com/h5bp/main.css#readme */
/*
 * What follows is the result of much research on cross-browser styling.
 * Credit left inline and big thanks to Nicolas Gallagher, Jonathan Neal,
 * Kroc Camen, and the H5BP dev community and team.
 */

/* ==========================================================================
   Base styles: opinionated defaults
   ========================================================================== */

html {
  color: #222;
  font-size: 1em;
  line-height: 1.4;
}

/*
 * Remove text-shadow in selection highlight:
 * https://twitter.com/miketaylr/status/12228805301
 *
 * Customize the background color to match your design.
 */

::-moz-selection {
  background: #b3d4fc;
  text-shadow: none;
}

::selection {
  background: #b3d4fc;
  text-shadow: none;
}

/*
 * A better looking default horizontal rule
 */

hr {
  display: block;
  height: 1px;
  border: 0;
  border-top: 1px solid #ccc;
  margin: 1em 0;
  padding: 0;
}

/*
 * Remove the gap between audio, canvas, iframes,
 * images, videos and the bottom of their containers:
 * https://github.com/h5bp/html5-boilerplate/issues/440
 */

audio,
canvas,
iframe,
img,
svg,
video {
  vertical-align: middle;
}

/*
 * Remove default fieldset styles.
 */

fieldset {
  border: 0;
  margin: 0;
  padding: 0;
}

/*
 * Allow only vertical resizing of textareas.
 */

textarea {
  resize: vertical;
}

/* ==========================================================================
   Author's custom styles
   ========================================================================== */
:root {
  --alabaster: #F9F7F2;
  --charcoal: #2C2C2C;
  --walnut: #8C6A43;
  --slate: #E5E5E5;
  --heading-font: 'Playfair Display', serif;
  --body-font: 'Inter', sans-serif;
}

body {
  background-color: var(--alabaster);
  color: var(--charcoal);
  font-family: var(--body-font);
  margin: 0;
  line-height: 1.6;
}

header {
  padding: 2rem;
  text-align: center;
  border-bottom: 1px solid var(--slate);
}

h1 {
  font-family: var(--heading-font);
  font-size: 2.5rem;
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--charcoal);
}

nav {
  margin-top: 1rem;
}

nav a {
  text-decoration: none;
  color: var(--charcoal);
  margin: 0 15px;
  font-family: var(--heading-font);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 3rem 1rem;
}

/* Responsive Gallery Grid */
/* New Grid Logic */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 25px;
  grid-auto-flow: dense; /* Fills in gaps automatically */
}

.gallery-item {
  background: none; /* Remove global background to allow transparency */
  overflow: hidden;
  min-height: 400px; /* Increased height for better pacing */
  max-height: 480px; /* Limit height to keep consistent rows */
  display: flex;
  align-items: center;
  justify-content: center;
}

/* The Quote Tile */
.gallery-item img {
  max-height: 480px;
  object-fit: cover;
  background-color: var(--slate); /* Keeps the "placeholder" look for images only */
}

/* The Quote "Floating" Box */
.quote-content {
  background-color: var(--walnut);
  color: white;
  padding: 3rem 2rem;
  text-align: center;
  width: 80%; /* Box takes up 80% of the grid cell width */
  max-width: 400px; /* Prevents it from getting too wide on desktop */
  box-shadow: 0 10px 30px rgba(0,0,0,0.05); /* Soft shadow for depth */
}

.quote-content p {
  font-family: var(--heading-font);
  font-style: italic;
  font-size: 1.1rem;
  margin: 0;
}

.quote-content span {
  display: block;
  margin-top: 1.5rem;
  text-transform: uppercase;
  font-size: 0.7rem;
  letter-spacing: 2px;
}

/* Make the first image or a specific quote wider on large screens */
@media (min-width: 900px) {
  .feature-wide {
    grid-column: span 2;
  }

  .feature-wide img {
    max-height: 100%;
  }
}

footer {
  text-align: center;
  padding: 3rem;
  border-top: 1px solid var(--slate);
  font-size: 0.8rem;
}

@media (max-width: 600px) {
  h1 { font-size: 1.8rem; }
  nav a { display: block; margin: 10px 0; }
}

.contact-section {
  background-color: var(--charcoal);
  color: var(--alabaster);
  padding: 1rem;
  text-align: center;
}

.contact-container {
  max-width: 600px;
  margin: 0 auto;
}

.contact-section h2 {
  font-family: var(--heading-font);
  font-size: 2rem;
  margin-bottom: 1rem;
}

.contact-section p {
  font-size: 1rem;
  opacity: 0.8;
  margin-bottom: 2.5rem;
}

.contact-btn {
  display: inline-block;
  padding: 1rem 2.5rem;
  background-color: var(--walnut);
  color: white;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: 0.8rem;
  transition: opacity 0.3s ease;
}

.contact-btn:hover {
  opacity: 0.9;
}

.social-footer {
  margin-top: 3rem;
  display: flex;
  justify-content: center;
  gap: 20px;
}

.social-footer a {
  color: var(--alabaster);
  text-decoration: none;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  border-bottom: 1px solid transparent;
  transition: border-bottom 0.3s ease;
}

.social-footer a:hover {
  border-bottom: 1px solid var(--walnut);
}

/* About Section Layout */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.about-image img {
  width: 100%;
  height: auto;
  border-radius: 2px;
  filter: grayscale(20%); /* Soft, professional look */
}

.about-text h2 {
  font-family: var(--heading-font);
  font-size: 2.5rem;
  margin-bottom: 1.5rem;
  line-height: 1.2;
}

.about-text p {
  font-size: 1.05rem;
  margin-bottom: 1.5rem;
  color: #444;
}

/* Process Gallery Styles */
.process-section {
  margin-top: 5rem;
  border-top: 1px solid var(--slate);
  padding-top: 4rem;
}

.process-header {
  text-align: center;
  margin-bottom: 3rem;
}

.process-header h3 {
  font-family: var(--heading-font);
  text-transform: uppercase;
  letter-spacing: 3px;
  font-size: 0.9rem;
  color: var(--walnut);
}

.process-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 15px;
}

.process-item {
  position: relative;
  filter: saturate(10%);
  transition: filter 0.3s ease;
}

.process-item:hover {
  filter: none;
}

.process-item img {
  width: 100%;
  height: 250px;
  object-fit: cover;
  display: block;
}

/* Small Caption for process details */
.process-item span {
  display: block;
  margin-top: 8px;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--walnut);
}
.fact-sheet {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 30px;
  margin-top: 3rem;
}

.fact-item {
  border-left: 1px solid var(--walnut);
  padding-left: 20px;
  padding-bottom: 10px;
}

.fact-label {
  display: block;
  text-transform: uppercase;
  font-size: 0.7rem;
  letter-spacing: 2px;
  color: var(--walnut);
  margin-bottom: 8px;
  font-weight: bold;
}

.fact-value {
  font-family: var(--heading-font);
  font-size: 1.2rem;
  line-height: 1.3;
  color: var(--charcoal);
}

/* Specialty Highlight for the Triangle */
.specialty-callout {
  grid-column: 1 / -1;
  background: var(--slate);
  padding: 2rem;
  margin-top: 2rem;
  display: flex;
  align-items: center;
  gap: 20px;
}

.triangle-icon {
  font-size: 2rem;
  color: var(--walnut);
}

/* Mobile Adjustments */
@media (max-width: 768px) {
  .about-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .about-text h2 { font-size: 2rem; }
}

/* Contact Form Styles */
.contact-form {
  margin-top: 3rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem 1.5rem; /* row-gap column-gap */
  align-items: baseline;
}

.form-group {
  display: contents;
}

.form-group label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  text-align: right;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 1rem;
  border: 1px solid var(--slate);
  background-color: var(--alabaster);
  color: var(--charcoal);
  font-family: var(--body-font);
  box-sizing: border-box;
}

.contact-form > .contact-btn {
    grid-column: 2 / 3;
    justify-self: start;
}

.success-message {
  color: #2E7D32; /* A pleasing green */
  background-color: #E8F5E9;
  padding: 1rem;
  border-radius: 4px;
  margin-bottom: 1.5rem;
}

.error-message {
  color: #C62828; /* A clear red */
  background-color: #FFEBEE;
  padding: 1rem;
  border-radius: 4px;
  margin-bottom: 1.5rem;
  list-style-position: inside;
}

/* ==========================================================================
   Helper classes
   ========================================================================== */

/*
 * Hide visually and from screen readers
 */

.hidden,
[hidden] {
  display: none !important;
}

/*
 * Hide only visually, but have it available for screen readers:
 * https://snook.ca/archives/html_and_css/hiding-content-for-accessibility
 *
 * 1. For long content, line feeds are not interpreted as spaces and small width
 *    causes content to wrap 1 word per line:
 *    https://medium.com/@jessebeach/beware-smushed-off-screen-accessible-text-5952a4c2cbfe
 */

.visually-hidden {
  border: 0;
  clip: rect(0, 0, 0, 0);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  white-space: nowrap;
  width: 1px;
  /* 1 */
}

/*
 * Extends the .visually-hidden class to allow the element
 * to be focusable when navigated to via the keyboard:
 * https://www.drupal.org/node/897638
 */

.visually-hidden.focusable:active,
.visually-hidden.focusable:focus {
  clip: auto;
  height: auto;
  margin: 0;
  overflow: visible;
  position: static;
  white-space: inherit;
  width: auto;
}

/*
 * Hide visually and from screen readers, but maintain layout
 */

.invisible {
  visibility: hidden;
}

/*
 * Clearfix: contain floats
 *
 * The use of `table` rather than `block` is only necessary if using
 * `::before` to contain the top-margins of child elements.
 */

.clearfix::before,
.clearfix::after {
  content: "";
  display: table;
}

.clearfix::after {
  clear: both;
}

/* ==========================================================================
   EXAMPLE Media Queries for Responsive Design.
   These examples override the primary ('mobile first') styles.
   Modify as content requires.
   ========================================================================== */

@media only screen and (min-width: 35em) {
  /* Style adjustments for viewports that meet the condition */
}

@media print,
  (-webkit-min-device-pixel-ratio: 1.25),
  (min-resolution: 1.25dppx),
  (min-resolution: 120dpi) {
  /* Style adjustments for high resolution devices */
}

/* ==========================================================================
   Print styles.
   Inlined to avoid the additional HTTP request:
   https://www.phpied.com/delay-loading-your-print-css/
   ========================================================================== */

@media print {
  *,
  *::before,
  *::after {
    background: #fff !important;
    color: #000 !important;
    /* Black prints faster */
    box-shadow: none !important;
    text-shadow: none !important;
  }

  a,
  a:visited {
    text-decoration: underline;
  }

  a[href]::after {
    content: " (" attr(href) ")";
  }

  abbr[title]::after {
    content: " (" attr(title) ")";
  }

  /*
   * Don't show links that are fragment identifiers,
   * or use the `javascript:` pseudo protocol
   */
  a[href^="#"]::after,
  a[href^="javascript:"]::after {
    content: "";
  }

  pre {
    white-space: pre-wrap !important;
  }

  pre,
  blockquote {
    border: 1px solid #999;
    page-break-inside: avoid;
  }

  tr,
  img {
    page-break-inside: avoid;
  }

  p,
  h2,
  h3 {
    orphans: 3;
    widows: 3;
  }

  h2,
  h3 {
    page-break-after: avoid;
  }
}

