@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@400;700&family=Fira+Sans:wght@400;600&display=swap');

/*! 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
   ========================================================================== */

/* ==========================================================================
   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;
  }
}




/* CUSTOM STYLES */


  :root {
    --color-bg: #f7f5f2;
    --color-primary: #4b3b2b;
    --color-secondary: #a07a58;
    --color-accent: #c9b89b;
    --color-text: #2e2a25;
    --color-muted: #7b6b5a;
    --fade-duration: 3s;
    --overlay-bg: rgba(0,0,0,0.8);
  }

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

  body {
    margin: 0; padding: 0;
    background: var(--color-bg);
    color: var(--color-text);
    font-family: 'Fira Sans', sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
  }

  h1, h2, h3 {
    font-family: 'Cormorant Garamond', serif;
    color: var(--color-primary);
    margin-top: 0;
  }

  h1 {
    font-weight: 700;
    font-size: clamp(2rem, 5vw, 3.5rem);
    line-height: 1.1;
  }

  h2 {
    font-weight: 600;
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    margin-bottom: 0.5em;
  }

  h3 {
    font-weight: 600;
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
  }

  p {
    margin-bottom: 1em;
    max-width: 48em;
    word-wrap: break-word;
  }

  a {
    color: var(--color-secondary);
    text-decoration: none;
    border-bottom: 2px solid transparent;
    transition: border-color 0.3s ease;
  }
  a:hover,
  a:focus {
    border-color: var(--color-accent);
  }

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

  /* HEADER */
  header.hero {
    background: linear-gradient(135deg, #e9e5dc 0%, #c9b89b 100%);
    padding: 5rem 1.25rem 4rem;
    text-align: center;
    color: var(--color-primary);
  }
  header.hero h1 {
    margin-bottom: 0.5rem;
  }
  header.hero p {
    max-width: 700px;
    margin: 0 auto 2rem;
    font-size: clamp(1.1rem, 2vw, 1.3rem);
    color: var(--color-muted);
    font-weight: 500;
  }
  header.hero a.cta-btn {
    display: inline-block;
    background: var(--color-primary);
    color: var(--color-bg);
    font-weight: 700;
    padding: 1rem 2.8rem;
    border-radius: 40px;
    box-shadow: 0 5px 12px rgba(75, 59, 43, 0.3);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 1rem;
    transition: background-color 0.3s ease;
    cursor: pointer;
  }
  header.hero a.cta-btn:hover,
  header.hero a.cta-btn:focus {
    background: var(--color-secondary);
    box-shadow: 0 6px 16px rgba(160, 122, 88, 0.45);
    outline: none;
  }

  /* PRODUCT BOXES */
  section.products {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    justify-content: center;
    padding: 3rem 1.25rem 5rem;
    max-width: 1100px;
    margin: 0 auto;
  }
  .product-box {
    background: white;
    border-radius: 14px;
    box-shadow:
      0 8px 15px rgba(0,0,0,0.08),
      inset 0 0 40px #f0e8d8;
    flex: 1 1 220px;
    max-width: 280px;
    padding: 2.3rem 1.5rem 3rem;
    text-align: center;
    cursor: default;
    transition: box-shadow 0.3s ease;
    outline-offset: 3px;
  }
  .product-box:focus-within,
  .product-box:hover {
    box-shadow:
      0 16px 32px rgba(0,0,0,0.14),
      inset 0 0 52px #f0e8d8;
  }

  /* Icons as inline SVG */
  .product-icon {
    width: 60px;
    height: 60px;
    margin-bottom: 1.25rem;
    fill: var(--color-secondary);
  }

  .product-title {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 700;
    font-size: 1.4rem;
    margin-bottom: 0.5rem;
    color: var(--color-primary);
  }
  .product-desc {
    font-weight: 500;
    color: var(--color-muted);
    font-size: 1.05rem;
  }

  /* FEATURED WORK */
  section.featured-work {
    padding: 0 1.25rem 5rem;
  }
  section.featured-work h2 {
    text-align: center;
    margin-bottom: 2.5rem;
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    color: var(--color-primary);
  }
  .cards-grid {
    display: grid;
    gap: 1.8rem;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    max-width: 1100px;
    margin: 0 auto;
  }
  .card {
    background: white;
    border-radius: 14px;
    box-shadow:
      0 8px 15px rgba(0,0,0,0.08),
      inset 0 0 40px #f0e8d8;
    cursor: pointer;
    outline-offset: 3px;
    display: flex;
    flex-direction: column;
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.35s ease;
  }
  .card:focus-visible {
    outline: 3px solid var(--color-secondary);
  }
  .card:hover,
  .card:focus {
    transform: translateY(-7px);
    box-shadow:
      0 18px 36px rgba(0,0,0,0.15),
      inset 0 0 50px #f0e8d8;
  }

  .card svg.placeholder {
    width: 100%;
    height: 180px;
    border-radius: 14px 14px 0 0;
    animation: fadePulse var(--fade-duration) ease-in-out infinite;
    fill: none;
    stroke: var(--color-accent);
    stroke-width: 3;
    stroke-dasharray: 12 8;
  }

  @keyframes fadePulse {
    0%, 100% { stroke-opacity: 0.3; }
    50% { stroke-opacity: 1; }
  }

  .card-content {
    padding: 1.3rem 1.8rem 2rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
  }
  .card-title {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 700;
    font-size: 1.4rem;
    margin-bottom: 0.75rem;
    color: var(--color-primary);
  }
  .card-desc {
    flex-grow: 1;
    color: var(--color-muted);
    font-size: 1.05rem;
    line-height: 1.4;
  }

  /* FROM BARN TO HOME BLURB */
  section.barn-to-home {
    max-width: 680px;
    margin: 0 auto 5rem;
    padding: 0 1.25rem;
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(1.1rem, 1.8vw, 1.35rem);
    color: var(--color-primary);
    text-align: center;
    font-style: italic;
    letter-spacing: 0.02em;
    user-select: none;
  }

  /* FOOTER */
footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center; /* optional */
  text-align: center !important;
  padding: 2.5rem 1rem;
  background-color: var(--color-primary);
  color: var(--color-bg);
  user-select: none;
}
footer p {
  width: 100%;
  margin: 0.25em 0;
}


  /* Responsive */
  @media (max-width: 600px) {
    section.products {
      flex-direction: column;
      align-items: center;
    }
  }
