/* Components: utility bar, header, nav, mobile menu, buttons, hero, bands, forms, footer. */

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  min-height: 48px;
  padding: 14px 28px;
  border: 1px solid var(--clay);
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: var(--step--1);
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: var(--track-button);
  text-transform: uppercase;
  white-space: nowrap;
  cursor: pointer;
  transition:
    background-color var(--dur-s) ease,
    border-color var(--dur-s) ease,
    color var(--dur-s) ease,
    transform var(--dur-s) ease;
}

.btn--solid {
  background: var(--clay);
  color: var(--ivory);
}

.btn--solid:hover {
  background: var(--clay-deep);
  border-color: var(--clay-deep);
}

.btn--ghost {
  background: transparent;
  color: var(--clay-deep);
}

.btn--ghost:hover {
  background: var(--clay-deep);
  border-color: var(--clay-deep);
  color: var(--ivory);
}

.btn:active {
  transform: translateY(1px);
}

.btn .icon-arrow {
  flex: none;
  transition: transform var(--dur-m) var(--ease-out);
}

.btn:hover .icon-arrow {
  transform: translateX(5px);
}

/* Icons share one grid and one stroke */

.icon {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.25;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---------- Utility bar ---------- */

.utility {
  height: var(--utility-h);
  background: var(--charcoal);
  color: var(--ivory);
  font-size: var(--step--1);
  letter-spacing: 0.08em;
  line-height: 1;
}

.utility__in {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-m);
  height: 100%;
}

.utility__list {
  display: flex;
  align-items: center;
  min-width: 0;
}

.utility__list > li {
  display: flex;
  align-items: center;
  white-space: nowrap;
}

.utility__list > li + li {
  margin-left: 20px;
  padding-left: 20px;
  border-left: 1px solid var(--rule-on-dark);
}

.utility__label {
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-weight: 500;
}

.utility a {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
}

.lang-switch {
  display: flex;
  align-items: center;
  gap: 4px;
  font-weight: 500;
  letter-spacing: 0.16em;
}

.lang-switch a,
.lang-switch .cur {
  padding-inline: 6px;
  opacity: 0.72;
  transition: opacity var(--dur-s) ease;
}

.lang-switch a:hover,
.lang-switch a:focus-visible {
  opacity: 1;
}

.lang-switch .cur {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  opacity: 1;
  box-shadow: inset 0 -1px 0 currentColor;
  cursor: default;
}

.lang-switch .sep {
  width: 1px;
  height: 12px;
  background: var(--rule-on-dark);
}

.utility__address,
.utility__phone-wide {
  display: none !important;
}

@media (min-width: 720px) {
  .utility__phone-wide {
    display: flex !important;
  }
}

@media (min-width: 1100px) {
  .utility__address {
    display: flex !important;
  }
}

/* ---------- Header ---------- */

.scroll-sentinel {
  position: absolute;
  top: 0;
  left: 0;
  width: 1px;
  height: 96px;
  pointer-events: none;
}

.site-header {
  position: sticky;
  top: calc(var(--utility-h) * -1);
  z-index: var(--z-header);
  background: var(--ivory);
  border-bottom: 1px solid transparent;
  transition: border-color var(--dur-m) ease;
}

.site-header.is-compact {
  border-bottom-color: var(--rule);
}

.header__bar {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  column-gap: clamp(16px, 2.2vw, 40px);
  height: var(--header-h);
  transition: height var(--dur-m) var(--ease-out);
}

.site-header.is-compact .header__bar {
  height: var(--header-h-compact);
}

.brand {
  display: block;
  line-height: 0;
}

.brand img {
  height: 62px;
  width: auto;
  transition: height var(--dur-m) var(--ease-out);
}

.site-header.is-compact .brand img {
  height: 44px;
}

.nav {
  display: none;
  justify-self: center;
}

.nav__list {
  display: flex;
  align-items: center;
  gap: clamp(14px, 1.9vw, 34px);
}

.nav__link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: var(--step--1);
  font-weight: 500;
  letter-spacing: var(--track-nav);
  text-transform: uppercase;
  white-space: nowrap;
}

.nav__link .link-u::after {
  bottom: -5px;
}

.nav__link[aria-current="page"] {
  color: var(--clay-deep);
}

.nav__link[aria-current="page"] .link-u::after {
  transform: scaleX(1);
}

.header__cta {
  display: none;
  padding-inline: clamp(18px, 1.8vw, 28px);
}

/* Cart icon + consultation button + menu toggle share the third header column
   (tienda/ header of home-david). Without this wrapper the cart link takes that
   column and the button drops onto a second row. */
.header__tools {
  grid-column: 3;
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.header__tools .menu-toggle {
  grid-column: auto;
  justify-self: auto;
}

.cart-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 48px;
  height: 48px;
  color: var(--charcoal);
}

.cart-toggle__count {
  position: absolute;
  top: 6px;
  right: 4px;
  min-width: 18px;
  height: 18px;
  padding-inline: 4px;
  border-radius: 99px;
  background: var(--clay);
  color: var(--ivory);
  font-size: 11px;
  font-weight: 500;
  line-height: 18px;
  text-align: center;
}

.cart-toggle__count[hidden] { display: none; }

.menu-toggle {
  grid-column: 3;
  justify-self: end;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  padding-inline: 4px;
  font-size: var(--step--1);
  font-weight: 500;
  letter-spacing: var(--track-label);
  text-transform: uppercase;
}

.menu-toggle__bars {
  position: relative;
  width: 26px;
  height: 10px;
}

.menu-toggle__bars::before,
.menu-toggle__bars::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 1.25px;
  background: currentColor;
  transition: transform var(--dur-m) var(--ease-out);
}

.menu-toggle__bars::before {
  top: 0;
}

.menu-toggle__bars::after {
  bottom: 0;
  right: 6px;
}

.menu-toggle:hover .menu-toggle__bars::after {
  right: 0;
}

@media (min-width: 1024px) {
  .nav {
    display: block;
  }

  .header__cta {
    display: inline-flex;
  }

  .menu-toggle {
    display: none;
  }
}

@media (max-width: 1023.98px) {
  :root {
    --header-h: 76px;
    --header-h-compact: 60px;
  }

  .brand img {
    height: 54px;
  }

  .site-header.is-compact .brand img {
    height: 42px;
  }
}

@media (min-width: 1024px) and (max-width: 1199.98px) {
  .header__bar {
    column-gap: 16px;
  }

  .nav__list {
    gap: 14px;
  }

  .nav__link,
  .header__cta {
    letter-spacing: 0.1em;
  }

  .header__cta {
    padding-inline: 18px;
  }
}

/* ---------- Mobile menu (full-screen panel) ---------- */

.menu {
  position: fixed;
  inset: 0;
  z-index: var(--z-menu);
  display: flex;
  flex-direction: column;
  padding: 0 var(--gutter) max(24px, env(safe-area-inset-bottom));
  background: var(--ivory);
  overflow-y: auto;
  overscroll-behavior: contain;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity var(--dur-m) ease,
    visibility 0s linear var(--dur-m);
}

.menu[hidden] {
  display: none;
}

.menu.is-open {
  opacity: 1;
  visibility: visible;
  transition-delay: 0s;
}

.menu__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 76px;
  border-bottom: 1px solid var(--rule);
  flex: none;
}

.menu__top img {
  height: 54px;
  width: auto;
}

.menu__close {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding-inline: 4px;
  font-size: var(--step--1);
  font-weight: 500;
  letter-spacing: var(--track-label);
  text-transform: uppercase;
}

.menu__nav {
  flex: 1 0 auto;
  display: flex;
  align-items: center;
  padding-block: var(--space-m);
}

.menu__list {
  width: 100%;
}

.menu__list li {
  border-bottom: 1px solid var(--rule);
}

.menu__list a {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  min-height: 48px;
  padding-block: clamp(6px, 1.6vh, 14px);
  font-family: var(--font-display);
  font-size: clamp(1.875rem, 5.6vh, 2.75rem);
  font-weight: 300;
  line-height: 1.1;
  letter-spacing: -0.01em;
}

.menu__list a[aria-current="page"] {
  color: var(--clay);
  font-style: italic;
}

.menu__list .num {
  font-family: var(--font-body);
  font-size: var(--step--2);
  font-style: normal;
  font-weight: 500;
  letter-spacing: var(--track-label);
  color: var(--sage-deep);
}

.menu__foot {
  flex: none;
  display: grid;
  gap: var(--space-m);
  padding-top: var(--space-s);
}

.menu__foot .btn {
  width: 100%;
}

.menu__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-m);
  font-size: var(--step--1);
  letter-spacing: 0.08em;
}

.menu__meta .lang-switch {
  font-size: var(--step--1);
}

.menu__meta .lang-switch a,
.menu__meta .lang-switch .cur {
  opacity: 1;
  padding-inline: 8px;
  min-height: 44px;
}

.menu__meta .lang-switch a {
  color: var(--ink-soft);
}

@media (prefers-reduced-motion: no-preference) {
  .menu .menu__list li,
  .menu .menu__foot {
    opacity: 0;
    transform: translateY(14px);
    transition:
      opacity var(--dur-m) var(--ease-out),
      transform var(--dur-m) var(--ease-out);
  }

  .menu.is-open .menu__list li,
  .menu.is-open .menu__foot {
    opacity: 1;
    transform: none;
    transition-delay: calc(80ms + var(--i, 0) * 45ms);
  }
}

/* ---------- Text link (arrow link used on cards and section heads) ---------- */

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  font-size: var(--step--1);
  font-weight: 500;
  letter-spacing: var(--track-button);
  text-transform: uppercase;
  color: var(--clay-deep);
}

.text-link .icon {
  width: 20px;
  height: 20px;
  transition: transform var(--dur-m) var(--ease-out);
}

.text-link:hover .icon-arrow { transform: translateX(5px); }
.text-link:hover .icon-back { transform: translateX(-5px); }

/* ---------- Hero ---------- */

.hero {
  padding-top: clamp(28px, 4.2vw, 64px);
  padding-bottom: clamp(48px, 5vw, 80px);
}

.hero__grid {
  row-gap: var(--space-l);
  align-items: end;
}

.hero__copy {
  grid-column: 1 / -1;
}

.hero__title {
  font-size: clamp(2rem, 10vw, 5.25rem);
  line-height: 1.02;
  letter-spacing: -0.018em;
}

.hero__sub {
  display: flex;
  max-width: none;
  align-items: center;
  gap: var(--space-m);
  margin-top: clamp(24px, 3vw, 44px);
  color: var(--ink-soft);
}

.hero__sub::before {
  content: "";
  flex: none;
  width: clamp(32px, 5vw, 64px);
  height: 1px;
  background: var(--clay);
}

.hero__cta {
  margin-top: clamp(28px, 3.4vw, 48px);
}

.hero__actions {
  display: block;
}

.hero__figure {
  grid-column: 1 / -1;
}

.frame {
  position: relative;
  overflow: hidden;
  background: #e6dfd2;
  aspect-ratio: 4 / 5;
}

.frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 16% 30%;
}

.caption {
  display: grid;
  gap: 2px;
  margin-top: var(--space-s);
  padding-top: var(--space-xs);
  border-top: 1px solid var(--rule);
}

.caption__name {
  font-family: var(--font-display);
  font-size: var(--step-1);
  font-style: italic;
  font-weight: 400;
  line-height: 1.2;
}

.caption__role {
  font-size: var(--step--2);
  font-weight: 500;
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  color: var(--sage-deep);
}

@media (min-width: 640px) {
  .hero__figure {
    grid-column: 4 / -1;
  }

  .frame {
    aspect-ratio: 5 / 4;
  }
}

@media (min-width: 960px) {
  .hero__grid {
    row-gap: 0;
  }

  .hero__title {
    font-size: min(5.25rem, 5.85vw);
  }

  .hero__copy {
    grid-column: 1 / span 7;
    align-self: stretch;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: var(--space-2xl);
  }

  .hero__figure {
    grid-column: 8 / -1;
  }

  .frame {
    aspect-ratio: 1 / 1;
  }
}

/* ---------- Attributes band ---------- */

.attrs {
  border-block: 1px solid var(--rule);
}

.attrs__list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.attr {
  position: relative;
  display: grid;
  grid-template-rows: auto 1fr;
  gap: var(--space-m);
  padding: clamp(24px, 3vw, 44px) clamp(16px, 2vw, 32px);
}

.attr:nth-child(even) {
  border-left: 1px solid var(--rule);
}

.attr:nth-child(n + 3) {
  border-top: 1px solid var(--rule);
}

.attr__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

.attr__icon {
  width: 34px;
  height: 34px;
  color: var(--charcoal);
}

.attr__num {
  font-family: var(--font-display);
  font-size: var(--step-0);
  font-style: italic;
  line-height: 1;
  color: var(--clay);
}

.attr__label {
  max-width: 20ch;
  font-size: var(--step--1);
  font-weight: 500;
  line-height: 1.6;
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  text-wrap: balance;
}

@media (min-width: 900px) {
  .attrs__list {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .attr {
    padding-inline: clamp(24px, 2.4vw, 40px);
  }

  .attr:nth-child(n) {
    border-top: 0;
    border-left: 1px solid var(--rule);
  }

  .attr:first-child {
    border-left: 0;
    padding-left: 0;
  }

  .attr:last-child {
    padding-right: 0;
  }
}

/* ---------- Philosophy ---------- */

.philosophy {
  padding-block: var(--space-section);
}

.philosophy__grid {
  row-gap: var(--space-xl);
  align-items: end;
}

.philosophy__aside {
  display: none;
}

.philosophy__head {
  grid-column: 1 / -1;
}

.eyebrow {
  display: block;
  margin-bottom: var(--space-m);
  color: var(--sage-deep);
}

.philosophy__title {
  font-size: var(--step-6);
  line-height: 1;
  letter-spacing: -0.022em;
}

.philosophy__title .line:nth-child(2) .line__in {
  padding-left: 0.9em;
}

.philosophy__title .line:nth-child(3) .line__in {
  padding-left: 1.8em;
}

.philosophy__body {
  grid-column: 1 / -1;
  padding-top: var(--space-m);
  border-top: 1px solid var(--rule-strong);
}

.philosophy__body p {
  font-size: var(--step-1);
  line-height: 1.75;
  color: var(--charcoal);
}

@media (min-width: 900px) {
  .philosophy__grid {
    row-gap: 0;
  }

  .philosophy__aside {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-s);
    grid-column: 1;
    align-self: stretch;
  }

  .vtext {
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    font-size: var(--step--2);
    font-weight: 500;
    letter-spacing: 0.32em;
    text-transform: uppercase;
    color: var(--sage-deep);
    white-space: nowrap;
  }

  .philosophy__aside::after {
    content: "";
    flex: 1;
    width: 1px;
    margin-left: 5px;
    background: var(--rule-strong);
  }

  .philosophy__head {
    grid-column: 2 / span 6;
  }

  .philosophy__body {
    grid-column: 8 / -1;
    margin-bottom: 0.4rem;
  }
}

/* ---------- Page intro + forms (contact stub) ---------- */

.page-intro {
  padding-top: clamp(40px, 6vw, 96px);
  padding-bottom: var(--space-block);
}

.page-intro__title {
  font-size: clamp(2rem, 10vw, 5.25rem);
}

.page-intro__sub {
  margin-top: var(--space-m);
  color: var(--ink-soft);
}

.contact {
  padding-bottom: var(--space-section);
}

.contact__grid {
  row-gap: var(--space-2xl);
}

.contact__form {
  grid-column: 1 / -1;
  scroll-margin-top: calc(var(--header-h-compact) + 24px);
}

.contact__info {
  grid-column: 1 / -1;
  border-top: 1px solid var(--rule-strong);
  padding-top: var(--space-m);
}

.contact__title {
  font-size: var(--step-3);
  margin-bottom: var(--space-l);
}

.info-list {
  display: grid;
  gap: var(--space-l);
}

.info-list dt {
  margin-bottom: var(--space-3xs);
  color: var(--sage-deep);
}

.info-list dd {
  max-width: 34ch;
}

.field-grid {
  display: grid;
  gap: var(--space-m);
  grid-template-columns: 1fr;
}

.field {
  display: grid;
  gap: var(--space-2xs);
}

.field label,
.fieldset legend {
  font-size: var(--step--1);
  font-weight: 500;
  letter-spacing: var(--track-label);
  text-transform: uppercase;
}

.field input,
.field textarea {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border: 1px solid var(--field-line);
  border-radius: var(--radius);
  background: transparent;
  color: var(--charcoal);
  transition: border-color var(--dur-s) ease;
}

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

.field input:hover,
.field textarea:hover {
  border-color: var(--charcoal);
}

.field input:focus-visible,
.field textarea:focus-visible {
  outline: 2px solid var(--clay-deep);
  outline-offset: 2px;
  border-color: var(--charcoal);
}

.fieldset {
  border: 0;
  padding: 0;
  margin: var(--space-l) 0 0;
}

.fieldset legend {
  margin-bottom: var(--space-xs);
  padding: 0;
}

.checks {
  display: grid;
  gap: 4px var(--space-m);
}

.check {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  cursor: pointer;
}

.check input {
  flex: none;
  width: 20px;
  height: 20px;
  margin: 0;
  accent-color: var(--clay-deep);
}

.form__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-m);
  margin-top: var(--space-xl);
}

.form__note {
  font-size: var(--step--1);
  color: var(--ink-soft);
}

.form__status {
  margin-top: var(--space-m);
  min-height: 1.5em;
  font-size: var(--step--1);
  color: var(--clay-deep);
}

@media (min-width: 640px) {
  .field-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .field--wide {
    grid-column: 1 / -1;
  }

  .checks {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 960px) {
  .contact__info {
    grid-column: 1 / span 4;
    grid-row: 1;
    align-self: start;
  }

  .contact__form {
    grid-column: 6 / -1;
    grid-row: 1;
  }
}

/* ---------- Footer ---------- */

.site-footer {
  background: var(--charcoal);
  color: var(--ivory);
  padding-top: clamp(64px, 8vw, 128px);
  padding-bottom: var(--space-l);
}

.footer__grid {
  row-gap: var(--space-2xl);
}

.footer__brand {
  grid-column: 1 / -1;
}

.footer__logo {
  width: clamp(130px, 14vw, 168px);
  height: auto;
  padding: 0 0 var(--space-m);
}

.footer__appt {
  margin-top: var(--space-s);
  color: var(--on-dark-soft);
}

.footer__col {
  grid-column: 1 / -1;
}

.footer__col h2 {
  margin-bottom: var(--space-m);
  font-family: var(--font-body);
  font-size: var(--step--2);
  font-weight: 500;
  letter-spacing: var(--track-label);
  line-height: 1.4;
  text-transform: uppercase;
  color: var(--on-dark-soft);
}

.footer__list {
  display: grid;
  gap: 2px;
}

.footer__list a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
}

.footer__nav a {
  font-family: var(--font-display);
  font-size: var(--step-2);
  font-weight: 300;
  line-height: 1.2;
}

.footer__contact address {
  display: grid;
  gap: var(--space-xs);
  color: var(--ivory);
}

.footer__contact a {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
}

.footer__contact .icon {
  width: 22px;
  height: 22px;
}

.footer__bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-s) var(--space-l);
  margin-top: clamp(48px, 6vw, 96px);
  padding-top: var(--space-m);
  border-top: 1px solid var(--rule-on-dark);
  font-size: var(--step--1);
  letter-spacing: 0.06em;
  color: var(--on-dark-soft);
}

@media (max-width: 639.98px) {
  .footer__nav .footer__list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: var(--col-gap);
  }
}

@media (min-width: 640px) {
  .footer__brand {
    grid-column: 1 / -1;
  }

  .footer__col--nav {
    grid-column: 1 / span 6;
  }

  .footer__col--contact {
    grid-column: 7 / -1;
  }
}

@media (min-width: 960px) {
  .footer__brand {
    grid-column: 1 / span 4;
  }

  .footer__col--nav {
    grid-column: 6 / span 3;
  }

  .footer__col--contact {
    grid-column: 9 / -1;
  }
}
