@import url('https://fonts.googleapis.com/css2?family=Instrument+Sans:wght@400;500;600;700&family=IBM+Plex+Sans:wght@400;500;600&display=swap');

:root {
  --color-background: #F4EFE4;
  --color-background-2: #16281F;
  --color-background-error: #F6E3DE;
  --color-background-success: #E6EFE4;
  --color-main-1: #1F3B2E;
  --color-main-2: #B0562F;
  --font-main: 'IBM Plex Sans', sans-serif;
  --font-title: 'Instrument Sans', sans-serif;
  /* No distinct third face on this project — mono/label text is the body
     font, uppercased and tracked (CONVENTIONS.md §11: "--font-mono defaults
     to the same face as --font-main" when a project has only two faces). */
  --font-mono: var(--font-main);
  --color-text: #24211D;
  --color-link: #B0562F;
  --color-label: #8E8677;
  --color-error: #B3382F;
  --color-success: #2F5B45;

  /* Extended palette — this project's richer set beyond the generic roles
     above (see CONVENTIONS.md §11: structure is reusable, values are per-
     project; extra named tokens are fine when a design calls for more than
     the base nine). */
  --color-pine-2: #2F5B45;
  --color-pine-3: #16281F;
  --color-rust-2: #C4693B;
  --color-card: #FDFAF3;
  --color-line: #E4DCCB;
  --color-line-2: #D2C9B4;
  --color-ink-2: #605A50;
  --color-ink-3: #8E8677;
  --color-cream: #F1EBDD;
  --color-cream-2: #E9E2D3;
  --color-sage: #9DB4A4;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: var(--font-main);
  font-style: normal;
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--color-background);
  color: var(--color-text);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--color-link);
}

ul, ol {
  padding-left: 30px;
}

/* ==========================================================================
   TYPOGRAPHY
   ========================================================================== */

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-title);
  font-weight: 600;
  line-height: normal;
  color: var(--color-text);
}

/* The universal reset above wins over inheritance for accent spans/em inside
   headings — set the title font explicitly here (CONVENTIONS.md §11 gotcha). */
h1 em, h2 em, h3 em, h4 em, h5 em, h6 em {
  font-family: var(--font-title);
  font-style: normal;
  color: var(--color-main-2);
}

h1 {
  font-size: 90px;
  @media (max-width: 1024px) {
    font-size: 60px;
  }
}

h2 {
  font-size: 60px;
  @media (max-width: 1024px) {
    font-size: 48px;
  }
}

h3 {
  font-size: 48px;
  @media (max-width: 1024px) {
    font-size: 36px;
  }
}

h4 {
  font-size: 36px;
  @media (max-width: 1024px) {
    font-size: 24px;
  }
}

h5 {
  font-size: 24px;
  @media (max-width: 1024px) {
    font-size: 18px;
  }
}

h6 {
  font-size: 18px;
  @media (max-width: 1024px) {
    font-size: 16px;
  }
}

p, span, li {
  font-size: 16px;
  font-weight: 400;
  line-height: 150%;
  color: var(--color-text);
}

/* Small tracked mono label — eyebrows, tags, prices, coordinates */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--color-main-2);
}

/* ==========================================================================
   SPACING SYSTEM
   Unified top/bottom rhythm for sections and blocks. Main sections should
   share the same vertical padding (e.g. 120px) unless the design calls for
   something different. Use these utilities instead of one-off px values.
   ========================================================================== */

.mt-120 {
  margin-top: 120px;
  @media (max-width: 1360px) {
    margin-top: 60px;
  }
}

.mt-60 {
  margin-top: 60px;
  @media (max-width: 1360px) {
    margin-top: 30px;
  }
}

.mb-120 {
  margin-bottom: 120px;
  @media (max-width: 1360px) {
    margin-bottom: 60px;
  }
}

.mb-60 {
  margin-bottom: 60px;
  @media (max-width: 1360px) {
    margin-bottom: 30px;
  }
}

/* Standard gap between a section's title block (heading ± intro paragraph)
   and whatever content follows it (button, form, cards, etc.) */
.mb-36 {
  margin-bottom: 36px;
  @media (max-width: 1360px) {
    margin-bottom: 18px;
  }
}

.pt-120 {
  padding-top: 120px;
  @media (max-width: 1360px) {
    padding-top: 60px;
  }
}

.pt-60 {
  padding-top: 60px;
  @media (max-width: 1360px) {
    padding-top: 30px;
  }
}

.pb-120 {
  padding-bottom: 120px;
  @media (max-width: 1360px) {
    padding-bottom: 60px;
  }
}

.pb-60 {
  padding-bottom: 60px;
  @media (max-width: 1360px) {
    padding-bottom: 30px;
  }
}

/* ==========================================================================
   BUTTON
   Pill-shaped, per Caravanza's rounder, warmer brand direction (vs. a
   sharper base default) — CONVENTIONS.md §16: re-skin per project.
   ========================================================================== */

.button {
  width: fit-content;
  height: auto;
  padding: 15px 28px;
  display: flex;
  align-items: center;
  gap: 6px;
  border-radius: 99px;
  font-family: var(--font-main);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: background-color 0.25s ease, border-color 0.25s ease, color 0.25s ease, filter 0.25s ease, transform 0.25s ease;
}

.button:disabled {
  opacity: 0.5;
  pointer-events: none;
}

.button i {
  transition: transform 0.25s ease;
}

.button:hover i {
  transform: translateX(3px);
}

.button.btn-primary {
  background: var(--color-main-2);
  border-color: var(--color-main-2);
  color: #FDF6F0;
  box-shadow: 0 14px 30px -14px rgba(176, 86, 47, 0.7);
}

.button.btn-primary:hover {
  filter: brightness(1.06);
  transform: translateY(-1px);
}

/* Transparent + outlined — uses the current text color, so it reads
   correctly both on a light section and over a dark/image background. */
.button.btn-ghost {
  background: transparent;
  border-color: currentColor;
  color: inherit;
}

.button.btn-ghost:hover {
  background: var(--color-background);
  border-color: var(--color-background);
  color: var(--color-main-1);
}

/* ==========================================================================
   NAV TOGGLE
   Hamburger button for collapsed nav (hidden on desktop — the breakpoint
   that shows it is defined per-project in style.css, next to that nav's own
   markup). main.js swaps the icon between ri-menu-line / ri-close-line and
   toggles .is-open on the nav it controls.
   ========================================================================== */

.nav-toggle {
  display: none;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  font-size: 24px;
  color: var(--color-text);
  cursor: pointer;
}

/* ==========================================================================
   SCROLL TO TOP
   Hidden until the page is scrolled past a threshold, then faded in.
   Toggled via .is-visible by main.js.
   ========================================================================== */

.scroll-top-btn {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-main-1);
  color: var(--color-cream);
  border: none;
  border-radius: 50%;
  font-size: 20px;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: opacity 0.3s ease, transform 0.3s ease, background-color 0.2s ease;
  z-index: 998;
}

.scroll-top-btn.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.scroll-top-btn:hover {
  background: var(--color-main-2);
}

/* ==========================================================================
   LINK ARROW
   A text link with a visible icon bullet that nudges forward and picks up
   the accent color on hover — for nav/footer/menu items. Markup:
   <a class="link-arrow"><i class="ri-arrow-right-s-line"></i><span>Label</span></a>
   ========================================================================== */

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  transition: color 0.2s ease;
}

.link-arrow i {
  display: inline-block;
  font-size: 16px;
  line-height: 1;
  color: var(--color-main-2);
  transform: translateX(0);
  transition: transform 0.25s ease;
}

.link-arrow:hover {
  color: var(--color-main-2);
}

.link-arrow:hover i {
  transform: translateX(4px);
}

/* ==========================================================================
   CONTACT ITEM
   Pairs an icon with a contact detail (email, phone, address, ...). Markup:
   <a class="contact-item"><i class="ri-mail-line"></i><span>hello@example.com</span></a>
   ========================================================================== */

.contact-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  transition: color 0.2s ease;
}

.contact-item i {
  font-size: 16px;
  line-height: 1;
  color: var(--color-main-2);
}

a.contact-item:hover {
  color: var(--color-main-2);
}

/* ==========================================================================
   ACCORDION
   Single-open accordion (FAQ, etc). Markup:
   <div class="accordion-wrapper">
     <div class="accordion-item active">
       <div class="item-title-wrapper">
         <span>Question</span>
         <i class="ri-add-line"></i>
       </div>
       <div class="item-description-wrapper">
         <div class="item-content">
           <p>Answer</p>
         </div>
       </div>
     </div>
   </div>
   JS: initFaqAccordion() in main.js drives open/close (single item open at a
   time) via jQuery slideUp/slideDown; add/remove "active" toggles the styling
   below and rotates the icon 45deg into an "x".
   ========================================================================== */

.accordion-wrapper {
  display: flex;
  flex-direction: column;
  row-gap: 18px;
  max-width: 860px;
  margin: 0 auto;
}

.accordion-item {
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--color-line);
}

.item-title-wrapper {
  height: 60px;
  padding: 0 24px;
  display: grid;
  grid-template-columns: auto 20px;
  column-gap: 14px;
  align-items: center;
  background: var(--color-card);
  cursor: pointer;
  transition: background-color 0.25s ease, color 0.25s ease;
}

.item-title-wrapper span {
  color: var(--color-text);
}

.item-title-wrapper i {
  font-size: 20px;
  color: var(--color-ink-3);
  transition: transform 0.25s ease, color 0.25s ease;
}

.item-description-wrapper {
  display: none;
  background: var(--color-card);
}

.item-content {
  padding: 12px 24px 28px;
}

.item-content p {
  color: var(--color-ink-2);
}

.accordion-item.active .item-title-wrapper {
  background: var(--color-main-1);
}

.accordion-item.active .item-title-wrapper span {
  color: var(--color-cream);
}

.accordion-item.active .item-title-wrapper i {
  color: var(--color-cream);
  transform: rotate(45deg);
}

/* ==========================================================================
   GRID (row / col)
   Minimal flex-based grid for laying out form fields side by side. Not a
   full breakpoint grid system — just enough to pair two fields on one row
   and let a field span the full row.

   <div class="row">
     <div class="col">...</div>       // shares the row with its siblings
     <div class="col col-12">...</div> // always spans the full row
   </div>
   ========================================================================== */

.row {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
}

.row .col {
  flex: 1 1 240px;
}

.row .col-12 {
  flex: 1 1 100%;
}

/* ==========================================================================
   FORMS
   Markup pattern (see forms/contact.php + forms/validate.js, which drives the
   submit/validation behavior behind these classes):

   <form class="contact-form-box php-email-form" data-action="forms/contact.php" novalidate>
     <div class="row">
       <div class="col">
         <div class="form-clt">
           <input class="access-input" name="name" ...>
           <span class="field-error" id="err-name">...</span>
         </div>
       </div>
       <div class="col col-12">
         <div class="form-loading loading">...</div>
         <div class="form-error-msg error-message"><span></span></div>
         <div class="form-sent sent-message">...</div>
       </div>
       <div class="col col-12">
         <div class="contact-button">
           <button type="submit" class="button btn-primary">Send</button>
         </div>
       </div>
     </div>
   </form>
   ========================================================================== */

/* Bootstrap-style visibility hook: forms/validate.js toggles this class to
   reveal the loading/error/success states below. */
.d-block {
  display: block !important;
}

.contact-form-box {
  max-width: 640px;
  margin: 0 auto;
}

.form-clt {
  position: relative;
}

.access-input {
  width: 100%;
  height: 56px;
  padding: 0 20px;
  background: var(--color-card);
  border-radius: 99px;
  border: 1.5px solid var(--color-line-2);
  color: var(--color-text);
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

.access-input::placeholder {
  color: var(--color-ink-3);
}

.access-input:focus-visible {
  outline: none;
  border-color: var(--color-main-2);
}

textarea.access-input {
  height: auto;
  border-radius: 20px;
  padding-top: 18px;
  padding-bottom: 18px;
  resize: none;
}

/* Custom select: a native <select> styled to match .access-input. The
   browser's own dropdown arrow can't be restyled cross-browser, so it's
   suppressed (appearance: none) and replaced with a Remix Icon caret laid
   over it. Markup:
   <div class="form-clt select-clt">
     <select class="access-input" name="...">...</select>
     <i class="ri-arrow-down-s-line select-caret"></i>
   </div> */
.select-clt {
  position: relative;
}

select.access-input {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 44px;
  cursor: pointer;
}

.select-caret {
  position: absolute;
  top: 50%;
  right: 18px;
  transform: translateY(-50%);
  font-size: 18px;
  color: var(--color-ink-3);
  pointer-events: none;
}

.access-input.input-error {
  background: var(--color-background-error);
  border-color: var(--color-error);
  color: var(--color-error);
}

.access-input.input-error::placeholder {
  color: var(--color-error);
}

.field-error {
  display: none;
  margin-top: 6px;
  padding-left: 20px;
  font-size: 13px;
  color: var(--color-error);
}

.field-error.visible {
  display: block;
}

/* Loading / error / success states start hidden; forms/validate.js shows
   the relevant one via .d-block. */
.loading,
.error-message,
.sent-message {
  display: none;
}

.form-loading {
  text-align: center;
  color: var(--color-text);
}

.form-loading-spinner {
  display: inline-block;
  vertical-align: middle;
  width: 18px;
  height: 18px;
  margin-right: 12px;
  border: 2px solid var(--color-line-2);
  border-top-color: var(--color-main-2);
  border-radius: 50%;
  animation: form-spin 0.6s linear infinite;
}

@keyframes form-spin {
  to {
    transform: rotate(360deg);
  }
}

.form-error-msg {
  padding: 12px 18px;
  background: var(--color-background-error);
  color: var(--color-error);
  border-radius: 12px;
}

.form-error-msg i {
  display: inline-block;
  vertical-align: middle;
  margin-right: 12px;
}

.form-sent {
  padding: 24px;
  background: var(--color-background-success);
  border-radius: 12px;
}

.form-sent-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  margin-bottom: 12px;
  background: var(--color-success);
  color: var(--color-cream);
  font-weight: 700;
  border-radius: 50%;
}

.form-sent-title {
  margin-bottom: 6px;
  color: var(--color-success);
  font-weight: 500;
}

.form-sent-sub {
  color: var(--color-text);
}

/* ==========================================================================
   SCROLL REVEAL
   Generic fade + rise-in, triggered once via IntersectionObserver in
   main.js (initScrollReveal). Add [data-reveal] to any element; optional
   [data-reveal-group] children get an auto-incrementing stagger delay.
   ========================================================================== */

[data-reveal] {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
