/* ==========================================================================
   Components
   ========================================================================== */

/* --------------------------------------------------------------------------
   Buttons & links
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.95rem 1.6rem;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 0.9375rem;
  font-weight: 500;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  transition:
    background-color 0.35s var(--ease),
    color 0.35s var(--ease),
    border-color 0.35s var(--ease),
    transform 0.35s var(--ease);
}

.btn svg { width: 18px; height: 18px; transition: transform 0.35s var(--ease); }
.btn:hover svg { transform: translateX(4px); }

.btn--primary { background: var(--c-accent-strong); color: var(--c-white); }
.btn--primary:hover { background: var(--c-accent-dark); }

.btn--ghost { border-color: currentColor; background: transparent; }
.btn--ghost:hover { background: var(--c-ink); border-color: var(--c-ink); color: var(--c-bg); }

.btn--light { background: var(--c-bg); color: var(--c-ink); }
.btn--light:hover { background: var(--c-white); }

.btn--ghost-light { border-color: rgba(255, 253, 249, 0.6); color: var(--c-white); }
.btn--ghost-light:hover { background: var(--c-white); color: var(--c-ink); border-color: var(--c-white); }

.btn[disabled] { opacity: 0.7; cursor: progress; }

.btn-row { display: flex; flex-wrap: wrap; gap: var(--sp-3); }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 500;
  text-decoration: none;
  border-bottom: 1px solid currentColor;
  padding-bottom: 2px;
}

.link-arrow svg { width: 16px; height: 16px; transition: transform 0.35s var(--ease); }
.link-arrow:hover { color: var(--c-accent-dark); }
.link-arrow:hover svg { transform: translateX(4px); }

/* --------------------------------------------------------------------------
   Media (image frame with fixed ratio and placeholder colour)
   -------------------------------------------------------------------------- */
.media {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--c-sand);
  aspect-ratio: var(--ratio, 4 / 3);
}

.media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.2s var(--ease);
}

/* --------------------------------------------------------------------------
   Sections
   -------------------------------------------------------------------------- */
.section { padding-block: var(--sp-8); }
.section--tight { padding-block: var(--sp-7); }
.section--sand { background: var(--c-sand); }
.section--dark { background: var(--c-ink); color: var(--c-bg); }
.section--dark .eyebrow { color: #D9946E; }
.section--dark .lead { color: rgba(245, 241, 234, 0.72); }

.section-head {
  display: grid;
  gap: var(--sp-4);
  margin-bottom: var(--sp-7);
}

.section-head h2 { max-width: 18ch; }

@media (min-width: 960px) {
  .section-head--split {
    grid-template-columns: 1fr auto;
    align-items: end;
    column-gap: var(--sp-7);
  }
  .section-head--split .section-head__aside { grid-column: 2; grid-row: 1 / span 2; align-self: end; }
}

/* --------------------------------------------------------------------------
   Home hero
   -------------------------------------------------------------------------- */
.hero {
  position: relative;
  display: grid;
  align-items: end;
  min-height: max(620px, 100svh);
  padding-block: calc(var(--header-h) + var(--sp-6)) var(--sp-7);
  color: var(--c-white);
  isolation: isolate;
  overflow: hidden;
}

.hero__media { position: absolute; inset: 0; z-index: -2; background: #3a342d; }

.hero__media img { width: 100%; height: 100%; object-fit: cover; }

@media (prefers-reduced-motion: no-preference) {
  .hero__media img { animation: hero-zoom 14s var(--ease) both; }
}

@keyframes hero-zoom {
  from { transform: scale(1.12); }
  to { transform: scale(1); }
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(20, 18, 15, 0.55) 0%, rgba(20, 18, 15, 0) 28%),
    linear-gradient(0deg, rgba(20, 18, 15, 0.78) 0%, rgba(20, 18, 15, 0.25) 55%, rgba(20, 18, 15, 0.1) 100%);
}

.hero__content { display: grid; gap: var(--sp-5); max-width: 760px; }
.hero .eyebrow { color: #F0C4A6; }
.hero h1 em { color: #F0C4A6; }

.hero__lead { font-size: var(--fs-2); max-width: 48ch; color: rgba(255, 253, 249, 0.86); }

.hero__bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: end;
  gap: var(--sp-6);
}

.hero__badge {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  padding: var(--sp-4) var(--sp-5);
  border: 1px solid rgba(255, 253, 249, 0.25);
  border-radius: var(--radius);
  background: rgba(31, 30, 28, 0.35);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  font-size: var(--fs-0);
}

.hero__badge strong { font-family: var(--f-display); font-size: var(--fs-4); font-weight: 400; line-height: 1; }

/* --------------------------------------------------------------------------
   Split (text + image)
   -------------------------------------------------------------------------- */
.split { display: grid; gap: var(--sp-6); align-items: center; }
.split__text { display: grid; gap: var(--sp-5); align-content: start; }

@media (min-width: 960px) {
  .split { grid-template-columns: 1fr 1fr; gap: var(--sp-8); }
  .split--reverse .split__media { order: -1; }
}

/* --------------------------------------------------------------------------
   Stats
   -------------------------------------------------------------------------- */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: var(--sp-5);
  padding-top: var(--sp-5);
  border-top: 1px solid var(--c-line);
}

.stats dt { order: 2; font-size: var(--fs-0); color: var(--c-muted); }
.stats dd { margin: 0; font-family: var(--f-display); font-size: var(--fs-5); line-height: 1; }
.stats div { display: flex; flex-direction: column; gap: var(--sp-2); }
.section--dark .stats { border-color: rgba(245, 241, 234, 0.16); }
.section--dark .stats dt { color: rgba(245, 241, 234, 0.65); }

/* --------------------------------------------------------------------------
   Cards (shared)
   -------------------------------------------------------------------------- */
.card-grid { display: grid; gap: var(--sp-5); }

@media (min-width: 640px) { .card-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .card-grid--3 { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 960px) { .card-grid--4 { grid-template-columns: repeat(4, 1fr); } }

.service-card {
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
  padding: var(--sp-6) var(--sp-5);
  border-radius: var(--radius-lg);
  background: var(--c-white);
  border: 1px solid var(--c-line);
  transition: transform 0.5s var(--ease), box-shadow 0.5s var(--ease);
}

.service-card__icon {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--c-bg);
  color: var(--c-accent);
}

.service-card__icon svg { width: 26px; height: 26px; }
.service-card p { color: var(--c-muted); }
.service-card .link-arrow { margin-top: auto; align-self: flex-start; }

.project-card { display: grid; gap: var(--sp-4); text-decoration: none; }
.project-card .media { --ratio: 4 / 5; }
.project-card__meta { display: flex; justify-content: space-between; gap: var(--sp-3); font-size: var(--fs-0); color: var(--c-muted); }
.project-card h3 { font-size: var(--fs-3); }

.project-card__tag {
  position: absolute;
  left: var(--sp-4);
  top: var(--sp-4);
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  background: rgba(255, 253, 249, 0.9);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .service-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
  .project-card:hover .media img { transform: scale(1.06); }
}

/* --------------------------------------------------------------------------
   Process steps
   -------------------------------------------------------------------------- */
.steps {
  display: grid;
  gap: var(--sp-6) var(--sp-5);
  counter-reset: step;
  list-style: none;
  padding: 0;
}

.steps li {
  counter-increment: step;
  display: grid;
  gap: var(--sp-3);
  padding-top: var(--sp-5);
  border-top: 1px solid rgba(245, 241, 234, 0.2);
}

.steps li::before {
  content: "0" counter(step);
  font-family: var(--f-display);
  font-size: var(--fs-4);
  font-style: italic;
  color: #D9946E;
  line-height: 1;
}

.steps p { color: rgba(245, 241, 234, 0.72); }

@media (min-width: 640px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .steps { grid-template-columns: repeat(4, 1fr); } }

/* --------------------------------------------------------------------------
   Testimonials
   -------------------------------------------------------------------------- */
.testimonial {
  display: grid;
  gap: var(--sp-6);
  max-width: 980px;
  margin-inline: auto;
  text-align: center;
  justify-items: center;
}

.testimonial blockquote p {
  font-family: var(--f-display);
  font-size: var(--fs-4);
  line-height: 1.3;
  font-weight: 300;
  text-wrap: balance;
}

.testimonial blockquote p::before { content: "\201C"; color: var(--c-accent); }
.testimonial blockquote p::after { content: "\201D"; color: var(--c-accent); }

.person { display: flex; align-items: center; gap: var(--sp-4); text-align: left; }
.person img { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; background: var(--c-sand); }
.person strong { display: block; font-weight: 600; }
.person__role { font-size: var(--fs-0); color: var(--c-muted); }

.quote-card {
  display: flex;
  flex-direction: column;
  gap: var(--sp-5);
  padding: var(--sp-6) var(--sp-5);
  border-radius: var(--radius-lg);
  background: var(--c-white);
  border: 1px solid var(--c-line);
}

.quote-card blockquote { flex: 1; }
.quote-card blockquote p { font-family: var(--f-display); font-size: var(--fs-2); line-height: 1.45; }

.stars { display: flex; gap: 2px; color: var(--c-accent); }
.stars svg { width: 16px; height: 16px; }

/* --------------------------------------------------------------------------
   CTA band
   -------------------------------------------------------------------------- */
.cta-band {
  position: relative;
  display: grid;
  gap: var(--sp-5);
  padding: var(--sp-7) clamp(1.5rem, 5vw, 4.5rem);
  border-radius: var(--radius-lg);
  background: var(--c-accent-strong);
  color: var(--c-white);
  overflow: hidden;
  isolation: isolate;
}

.cta-band::after {
  content: "";
  position: absolute;
  right: -120px;
  bottom: -220px;
  z-index: -1;
  width: 480px;
  height: 480px;
  border: 1px solid rgba(255, 253, 249, 0.3);
  border-radius: 50%;
  box-shadow: 0 0 0 60px rgba(255, 253, 249, 0.06), 0 0 0 140px rgba(255, 253, 249, 0.04);
}

.cta-band > div { display: grid; gap: var(--sp-4); }
.cta-band h2 { max-width: 16ch; }
.cta-band p { max-width: 46ch; color: rgba(255, 253, 249, 0.88); }

@media (min-width: 960px) {
  .cta-band { grid-template-columns: 1fr auto; align-items: end; }
}

/* --------------------------------------------------------------------------
   Values / team / services detail
   -------------------------------------------------------------------------- */
.value { display: grid; gap: var(--sp-3); padding-top: var(--sp-5); border-top: 1px solid var(--c-line); }
.value p { color: var(--c-muted); }

.team-card { display: grid; gap: var(--sp-4); }
.team-card .media { --ratio: 4 / 5; }
.team-card h3 { font-size: var(--fs-3); }
.team-card p { font-size: var(--fs-0); color: var(--c-muted); }

.service-list { display: grid; border-top: 1px solid var(--c-line); }

.service-row {
  display: grid;
  gap: var(--sp-4);
  padding-block: var(--sp-6);
  border-bottom: 1px solid var(--c-line);
}

.service-row__num { font-family: var(--f-display); font-style: italic; font-size: var(--fs-3); color: var(--c-accent); }
.service-row ul { display: grid; gap: var(--sp-2); padding-left: 1.1rem; color: var(--c-muted); }
.service-row ul li::marker { color: var(--c-accent); }
.service-row__price { font-size: var(--fs-0); color: var(--c-muted); }
.service-row__price strong { display: block; font-family: var(--f-display); font-size: var(--fs-3); font-weight: 400; color: var(--c-ink); }

@media (min-width: 960px) {
  .service-row { grid-template-columns: 80px 1.1fr 1.3fr 180px; gap: var(--sp-6); align-items: start; }
  .service-row__price { text-align: right; }
}

/* --------------------------------------------------------------------------
   FAQ
   -------------------------------------------------------------------------- */
.faq { display: grid; border-top: 1px solid var(--c-line); max-width: 880px; }

.faq details { border-bottom: 1px solid var(--c-line); }

.faq summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--sp-5);
  padding-block: var(--sp-5);
  font-family: var(--f-display);
  font-size: var(--fs-2);
  cursor: pointer;
  list-style: none;
}

.faq summary::-webkit-details-marker { display: none; }

.faq summary::after {
  content: "";
  flex: none;
  width: 14px;
  height: 14px;
  background:
    linear-gradient(currentColor, currentColor) center / 100% 1.5px no-repeat,
    linear-gradient(currentColor, currentColor) center / 1.5px 100% no-repeat;
  transition: transform 0.4s var(--ease);
}

.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding-bottom: var(--sp-5); max-width: 66ch; color: var(--c-muted); }

/* --------------------------------------------------------------------------
   Portfolio filters & grid
   -------------------------------------------------------------------------- */
.filters { display: flex; flex-wrap: wrap; gap: var(--sp-2); margin-bottom: var(--sp-6); }

.filter-btn {
  padding: 0.6rem 1.15rem;
  border: 1px solid var(--c-line);
  border-radius: 999px;
  background: transparent;
  font-size: 0.9375rem;
  transition: background-color 0.3s, color 0.3s, border-color 0.3s;
}

.filter-btn:hover { border-color: var(--c-ink); }
.filter-btn[aria-pressed="true"] { background: var(--c-ink); border-color: var(--c-ink); color: var(--c-bg); }

.portfolio-grid { display: grid; gap: var(--sp-6) var(--sp-5); }

@media (min-width: 640px) { .portfolio-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .portfolio-grid { grid-template-columns: repeat(3, 1fr); } }

.portfolio-grid .project-card[hidden] { display: none; }

@media (prefers-reduced-motion: no-preference) {
  .portfolio-grid .project-card.is-entering { animation: card-in 0.6s var(--ease) both; }
}

@keyframes card-in {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: none; }
}

/* --------------------------------------------------------------------------
   Case study
   -------------------------------------------------------------------------- */
.case { display: grid; gap: var(--sp-6); }

.case__gallery { display: grid; gap: var(--sp-4); grid-template-columns: 2fr 1fr; }
.case__gallery .media:first-child { grid-row: span 2; --ratio: auto; height: 100%; min-height: 320px; }
.case__gallery .media { --ratio: 1 / 1; }

.case__steps { display: grid; gap: var(--sp-5); }
.case__steps h3 { font-family: var(--f-body); font-size: var(--fs-0); font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: #D9946E; margin-bottom: var(--sp-2); }
.case__steps p { color: rgba(245, 241, 234, 0.78); }

@media (min-width: 960px) {
  .case { grid-template-columns: 1.15fr 1fr; gap: var(--sp-8); align-items: center; }
}

/* --------------------------------------------------------------------------
   Contact
   -------------------------------------------------------------------------- */
.contact-grid { display: grid; gap: var(--sp-7); }

@media (min-width: 960px) {
  .contact-grid { grid-template-columns: 1.35fr 1fr; gap: var(--sp-8); align-items: start; }
}

.info-list { display: grid; gap: var(--sp-5); list-style: none; padding: 0; }
.info-list li { display: grid; grid-template-columns: 44px 1fr; gap: var(--sp-4); align-items: start; }
.info-list h3 { font-family: var(--f-body); font-size: var(--fs-0); font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--c-muted); margin-bottom: var(--sp-1); }
.info-list a { text-decoration: none; }
.info-list a:hover { color: var(--c-accent-dark); }

.info-list__icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--c-sand);
  color: var(--c-accent-dark);
}

.info-list__icon svg { width: 20px; height: 20px; }

.map {
  margin-top: var(--sp-6);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--c-sand);
  aspect-ratio: 4 / 3;
  border: 1px solid var(--c-line);
}

.map iframe { width: 100%; height: 100%; border: 0; filter: grayscale(0.6) sepia(0.15); }

/* --------------------------------------------------------------------------
   Form
   -------------------------------------------------------------------------- */
.form-card {
  padding: clamp(1.5rem, 4vw, 3rem);
  border-radius: var(--radius-lg);
  background: var(--c-white);
  border: 1px solid var(--c-line);
  box-shadow: var(--shadow);
}

.form { display: grid; gap: var(--sp-5); }
.form__row { display: grid; gap: var(--sp-5); }

@media (min-width: 640px) { .form__row { grid-template-columns: 1fr 1fr; } }

.field { display: grid; gap: var(--sp-2); align-content: start; }

.field label, .field legend { font-size: 0.875rem; font-weight: 500; }
.field .optional { color: var(--c-muted); font-weight: 400; }

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 0.85rem 1rem;
  border: 1px solid rgba(31, 30, 28, 0.2);
  border-radius: 10px;
  background: var(--c-bg);
  font-size: 1rem;
  transition: border-color 0.25s, box-shadow 0.25s, background-color 0.25s;
}

.field textarea { min-height: 150px; resize: vertical; }

.field select {
  appearance: none;
  padding-right: 2.5rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231F1E1C' stroke-width='1.6'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.9rem center;
  background-size: 18px;
}

.field input:hover, .field select:hover, .field textarea:hover { border-color: rgba(31, 30, 28, 0.4); }

.field input:focus-visible,
.field select:focus-visible,
.field textarea:focus-visible {
  outline: none;
  border-color: var(--c-accent);
  background-color: var(--c-white);
  box-shadow: 0 0 0 4px rgba(180, 100, 60, 0.18);
}

.field__error { min-height: 0; font-size: 0.8125rem; color: #A3321F; }
.field__error:empty { display: none; }

.field.is-invalid input,
.field.is-invalid select,
.field.is-invalid textarea { border-color: #A3321F; background-color: #FCF4F1; }

.check { display: flex; gap: var(--sp-3); align-items: flex-start; font-size: 0.875rem; color: var(--c-muted); }
.check input { flex: none; width: 20px; height: 20px; margin-top: 2px; accent-color: var(--c-accent); }

.form__footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--sp-4); }
.form__note { font-size: var(--fs-0); color: var(--c-muted); }

.spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 253, 249, 0.4);
  border-top-color: var(--c-white);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

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

.form-success { display: grid; gap: var(--sp-4); justify-items: start; padding-block: var(--sp-6); }
.form-success:focus { outline: none; }

.form-success__icon {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--c-sage);
  color: var(--c-white);
}

.form-success__icon svg { width: 30px; height: 30px; }
.form-success p { color: var(--c-muted); max-width: 46ch; }

.avatar {
  display: grid;
  place-items: center;
  flex: none;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--c-sand);
  color: var(--c-accent-dark);
  font-family: var(--f-display);
  font-size: 1.125rem;
}
