@font-face {
  font-family: Geist;
  src: url("geist.woff2") format("woff2");
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
}

:root {
  color-scheme: light;
  --paper: #f4f3f0;
  --ink: #141414;
  --muted: #515151;
  --line: #c9c8c4;
  --accent: #344d63;
  --edge: clamp(1.25rem, 4.05vw, 5rem);
  font: 100% / 1.5 Geist, "Segoe UI", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--paper); }
a { color: inherit; }
img { display: block; max-width: 100%; }
h1, h2, h3, p { margin: 0; }
::selection { color: #fff; background: var(--accent); }
:focus-visible { outline: 2px solid #247eaf; outline-offset: 4px; }
.frame { width: min(100% - 2 * var(--edge), 96rem); margin-inline: auto; }
.skip-link { position: fixed; z-index: 3; top: .65rem; left: 1rem; padding: .6rem .9rem; background: white; transform: translateY(-150%); }
.skip-link:focus { transform: translateY(0); }

.site-header {
  position: relative;
  z-index: 1;
  border-bottom: 1px solid var(--line);
}
.home .site-header {
  position: absolute;
  inset: 0 0 auto;
  color: #fff;
  border-color: rgb(255 255 255 / 24%);
}
.header-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: stretch;
  min-height: 4.1rem;
}
.wordmark {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  white-space: nowrap;
  font-size: .99rem;
  font-weight: 700;
  letter-spacing: -.045em;
  text-decoration: none;
}
.wordmark span { color: var(--accent); }
.home .site-header .wordmark span { color: #bfced8; }
.desktop-nav {
  display: flex;
  align-items: stretch;
  gap: clamp(1.25rem, 2.55vw, 3.4rem);
}
.desktop-nav a, .header-contact, .mobile-menu summary {
  display: inline-flex;
  align-items: center;
  font-size: .92rem;
  font-weight: 500;
  text-decoration: none;
}
.site-header a:hover, .site-header a[aria-current] { text-decoration: underline; text-underline-offset: .32em; }
.header-contact { justify-self: end; }
.mobile-menu { display: none; }

.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: flex;
  align-items: end;
  min-height: 100svh;
  padding-block: 8rem clamp(3.5rem, 8.3svh, 7.2rem);
  background: #15191c;
  color: #fff;
}
.hero-image, .hero::after {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
}
.hero-image { object-fit: cover; object-position: center 23%; }
.hero::after {
  content: "";
  background:
    linear-gradient(0deg, rgb(8 12 15 / 89%) 1%, rgb(8 12 15 / 54%) 22%, transparent 63%),
    linear-gradient(180deg, rgb(8 12 15 / 68%), transparent 24%);
}
.hero-row { display: flex; justify-content: space-between; align-items: end; gap: clamp(1.8rem, 4.5vw, 6rem); }
.hero h1 {
  font-size: clamp(3.75rem, 8.2vw, 9.75rem);
  line-height: .91;
  font-weight: 540;
  letter-spacing: -.087em;
}
.hero h1 span { color: #b8c9d3; }
.hero p {
  margin-top: clamp(.9rem, 1.7vw, 1.55rem);
  color: #eaedf0;
  font-size: clamp(1.02rem, 1.47vw, 1.35rem);
  line-height: 1.4;
  letter-spacing: -.02em;
}
.hero .hero-location {
  margin: 0 0 1rem;
  color: #f1eeeb;
  font-size: .9rem;
  font-weight: 540;
  letter-spacing: .06em;
}
.hero-more {
  position: absolute;
  left: max(var(--edge), calc((100% - 96rem) / 2));
  bottom: 1.55rem;
  color: #fff;
  font-size: .9rem;
  text-underline-offset: .3em;
}
.hero-actions {
  flex: 0 1 27rem;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .65rem;
  margin-bottom: .2rem;
}
.hero-actions a, .primary-action {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 3.25rem;
  padding: .65rem 1rem;
  border-radius: .25rem;
  text-align: center;
  font-size: .95rem;
  font-weight: 550;
  line-height: 1.25;
  text-decoration: none;
  transition: background-color .2s ease, color .2s ease;
}
.hero-actions a { background: #ecece9; color: #15191c; }
.hero-actions a:hover { background: #fff; }
.hero-actions a:focus-visible, .home .site-header :focus-visible { outline-color: #fff; }
.primary-action { width: fit-content; margin-top: 1.7rem; padding-inline: 1.2rem; color: #fff; background: #192027; }
.primary-action:hover { background: var(--accent); }

.page-section, .contact-hero, .profile-hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, .92fr);
  gap: clamp(2rem, 6.5vw, 8rem);
}
.home-services { padding-block: clamp(3rem, 6.25vw, 7rem); }
.service-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(1.25rem, 3vw, 3rem); margin-top: clamp(1.5rem, 3.4vw, 3.5rem); }
.service-grid a { display: block; text-decoration: none; }
.service-grid a:hover h3 { text-decoration: underline; text-underline-offset: .15em; }
.service-grid img { width: 100%; height: auto; aspect-ratio: 5 / 3; object-fit: cover; margin-bottom: 1rem; }
.service-grid p { margin-top: .5rem; color: var(--muted); line-height: 1.55; }
.home-profile { background: #e7e5df; }
.home-profile .next-section { border-top: 0; }
.home-contact .primary-action { margin: 0; flex: 0 0 auto; }
.profile-portrait {
  width: 100%;
  height: auto;
  aspect-ratio: 5 / 6;
  max-height: 39rem;
  object-fit: cover;
  object-position: center 24%;
  background: #222;
}
.home-services h2, .page-section h2 {
  font-size: clamp(2.7rem, 5.05vw, 6rem);
  font-weight: 520;
  line-height: .98;
  letter-spacing: -.078em;
}
.entry-list article { padding-block: 1.35rem; border-top: 1px solid var(--line); }
.service-grid h3, .entry-list h3, .next-section h2 {
  font-size: clamp(1.28rem, 2.25vw, 2rem);
  font-weight: 520;
  line-height: 1.14;
  letter-spacing: -.045em;
}
.text-link { text-underline-offset: .23em; text-decoration-thickness: 1px; }
.text-link:hover { color: var(--accent); }
.entry-list p, .entry-list ul, .next-section p {
  color: var(--muted);
  font-size: clamp(1rem, 1.25vw, 1.16rem);
  line-height: 1.6;
  margin-top: .55rem;
}

.page-hero {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(2rem, 5.4vw, 7rem);
  padding-block: clamp(2.8rem, 5vw, 5.6rem);
}
.page-hero h1, .profile-hero h1, .contact-hero h1 {
  font-size: clamp(3.15rem, 6.75vw, 8.4rem);
  line-height: .94;
  font-weight: 535;
  letter-spacing: -.084em;
}
.page-hero h1 span, .contact-hero h1 span { color: var(--accent); }
.section-label { margin-bottom: .9rem; color: var(--muted); font-size: .9rem; font-weight: 525; }
.page-lede {
  max-width: 34ch;
  margin-top: 1.12rem;
  color: var(--muted);
  font-size: clamp(1.1rem, 1.9vw, 1.6rem);
  line-height: 1.37;
  letter-spacing: -.027em;
}
.page-photo { width: 100%; height: auto; aspect-ratio: 5 / 4; object-fit: cover; background: #222; }
.page-photo-law { object-position: 69% 50%; }
.page-section {
  border-top: 1px solid var(--line);
  padding-block: clamp(2.7rem, 5.2vw, 6rem) clamp(3.6rem, 6.8vw, 7rem);
}
.entry-list article:first-child { padding-top: 0; border-top: 0; }
.entry-list article:last-child { border-bottom: 0; padding-bottom: 0; }
.entry-list ul { margin-bottom: 0; padding-left: 1.15rem; }
.entry-list li + li { margin-top: .4rem; }
.next-section {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.3rem;
  border-top: 1px solid var(--line);
  padding-block: clamp(2rem, 4vw, 4rem);
}
.next-section .text-link { white-space: nowrap; }
.profile-hero { background: #181a1c; color: #f4f3f0; }
.profile-hero-inner { align-items: center; padding-block: clamp(2.8rem, 5vw, 5.6rem); }
.profile-hero .section-label, .profile-hero .page-lede { color: #d3d6d9; }
.profile-hero h1 span { color: #b8c9d3; }
.profile-hero + .page-section { border-top: 0; }
.contact-hero { align-items: start; padding-block: clamp(3rem, 6vw, 7rem); }
.contact-details { margin-top: clamp(1.5rem, 3vw, 3.2rem); }
.contact-details > div { border-top: 1px solid var(--line); padding-block: 1.25rem; }
.contact-details > div:last-child { border-bottom: 1px solid var(--line); }
.contact-details h2 { color: var(--muted); font-size: .93rem; font-weight: 520; margin-bottom: .45rem; }
.contact-phone { font-size: clamp(1.65rem, 3.1vw, 3.2rem); font-weight: 530; letter-spacing: -.055em; text-decoration: none; }
.contact-phone:hover { color: var(--accent); }
.contact-email { overflow-wrap: anywhere; text-underline-offset: .26em; }
address { font-style: normal; margin-bottom: .55rem; }
.contact-form {
  padding: clamp(1.2rem, 3vw, 2.6rem);
  background: #fbfaf7;
  border: 1px solid var(--line);
  scroll-margin-top: 1.15rem;
}
.contact-form h2, .privacy-page h1 { font-size: clamp(2rem, 3.6vw, 4rem); letter-spacing: -.06em; font-weight: 530; line-height: 1.08; }
.form-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; margin-top: 1.5rem; }
.form-fields label { display: grid; align-content: start; gap: .37rem; font-size: .95rem; font-weight: 540; }
.form-wide { grid-column: 1 / -1; }
.form-fields :is(input, select, textarea) {
  width: 100%;
  min-height: 2.85rem;
  padding: .62rem .7rem;
  border: 1px solid #a8a7a2;
  border-radius: .2rem;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 1rem;
  font-weight: 400;
}
.form-fields textarea { resize: vertical; }
.form-help, .form-privacy { font-size: .875rem; color: var(--muted); line-height: 1.45; }
.form-help { margin-top: -.45rem; }
.form-privacy { margin-top: 1.05rem; }
.form-privacy a { text-underline-offset: .16em; }
.form-check { position: absolute; width: 1px; height: 1px; clip-path: inset(100%); overflow: hidden; }
.contact-form button { border: 0; font-family: inherit; cursor: pointer; }
.contact-form button:disabled { opacity: .65; cursor: wait; }
.form-status { margin-top: 1rem; font-size: .95rem; font-weight: 520; }
.form-status[data-state="error"] { color: #872e29; }
.form-status[data-state="success"] { color: #285d41; }
.privacy-page { padding-block: clamp(3rem, 7vw, 6rem); }
.privacy-page > p { margin-block: .75rem 1.8rem; }
.privacy-page .entry-list { max-width: 68ch; }
.privacy-page h2 { font-size: 1.35rem; letter-spacing: -.04em; }
.privacy-page a { overflow-wrap: anywhere; }

.site-footer { border-top: 1px solid var(--line); }
.footer-row {
  display: grid;
  grid-template-columns: 1fr 1fr minmax(0, 1fr);
  align-items: start;
  gap: 1rem 2rem;
  padding-block: 2rem;
  font-size: .92rem;
}
.footer-brand p { color: var(--muted); margin-top: .35rem; }
.footer-row nav, .footer-contact { display: grid; gap: .3rem; }
.footer-row a { width: fit-content; text-underline-offset: .24em; }
.footer-row nav a { text-decoration: none; }
.footer-row a:hover, .footer-row nav a[aria-current] { text-decoration: underline; }
.footer-contact a { overflow-wrap: anywhere; }

@media (min-width: 55rem) and (min-aspect-ratio: 1 / 1) {
  .hero {
    align-items: center;
    padding-block: 7rem 3rem;
  }
  .hero::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -2;
    background:
      linear-gradient(90deg, rgb(16 20 24 / 96%), rgb(22 24 27 / 84%) 52%, rgb(22 24 27 / 50%)),
      url("inigo-calonge-retrato.webp") left 23% / 180% auto;
  }
  .hero-image {
    inset: 0 0 0 auto;
    width: min(67%, 111svh);
    object-position: center 20%;
    mask-image: linear-gradient(90deg, transparent, #000 23%);
  }
  .hero::after {
    background:
      linear-gradient(180deg, rgb(9 12 16 / 60%), transparent 23%),
      linear-gradient(0deg, rgb(9 12 16 / 48%), transparent 40%);
  }
  .hero .hero-row { flex-direction: column; align-items: start; gap: 1.8rem; }
  .hero .hero-identity { max-width: 48%; }
  .hero h1 { font-size: clamp(3.75rem, 7.65vw, 8.5rem); }
  .hero .hero-actions { flex: none; width: min(100%, 25rem); }
}

@media (max-width: 67rem) {
  .hero-row { flex-direction: column; align-items: start; gap: 1.55rem; }
  .hero-actions { flex: none; width: min(100%, 25rem); }
}

@media (max-width: 50rem) {
  .header-row { grid-template-columns: 1fr auto auto; gap: 1.25rem; min-height: 3.65rem; }
  .desktop-nav { display: none; }
  .mobile-menu { display: block; }
  .mobile-menu summary { height: 100%; cursor: pointer; list-style: none; gap: .4rem; }
  .mobile-menu summary::-webkit-details-marker { display: none; }
  .mobile-menu summary::after { content: "+"; font-size: 1.15rem; line-height: 1; }
  .mobile-menu[open] summary::after { content: "−"; }
  .mobile-menu nav {
    position: absolute;
    top: 100%;
    right: var(--edge);
    width: min(100% - 2 * var(--edge), 19rem);
    padding: .45rem 1.1rem;
    border: 1px solid var(--line);
    background: var(--paper);
    box-shadow: 0 .65rem 1.8rem rgb(0 0 0 / 15%);
  }
  .home .mobile-menu nav { background: #171b1f; border-color: #4c5257; }
  .mobile-menu a { display: flex; align-items: center; min-height: 2.8rem; text-decoration: none; }
  .mobile-menu a + a { border-top: 1px solid rgb(120 120 120 / 30%); }
}

@media (max-width: 42rem) {
  .hero { padding-bottom: clamp(3.75rem, 8svh, 4.5rem); }
  .hero-more { bottom: 1.05rem; }
  .hero h1 { font-size: clamp(3rem, 12.8vw, 5.8rem); }
  .hero-image { object-position: center 20%; }
  .hero::after {
    background:
      linear-gradient(0deg, rgb(8 12 15 / 95%), rgb(8 12 15 / 64%) 27%, transparent 61%),
      linear-gradient(180deg, rgb(8 12 15 / 70%), transparent 26%);
  }
  .hero-actions a { padding-inline: .55rem; }
  .page-hero, .page-section, .profile-hero-inner, .contact-hero { grid-template-columns: 1fr; gap: 1.7rem; }
  .service-grid { grid-template-columns: 1fr; gap: 1.8rem; }
  .form-fields { grid-template-columns: 1fr; }
  .page-photo { aspect-ratio: 16 / 10; }
  .page-hero h1, .profile-hero h1, .contact-hero h1 { font-size: clamp(3.05rem, 12.4vw, 5.35rem); }
  .next-section { flex-direction: column; align-items: start; }
  .footer-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-contact { grid-column: 1 / -1; }
}

@media (prefers-reduced-motion: reduce) {
  .hero-actions a, .primary-action { transition: none; }
}
