:root {
  --papel: #faf8f5;
  --lino: #ece7e0;
  --cafe: #3f3229;
  --cafe-2: #6e5f53;
  --arena: #d6ccc0;
  --basalto: #262220;

  --serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --sans: "Montserrat", system-ui, -apple-system, "Segoe UI", sans-serif;

  --wrap: 1180px;
  --gutter: clamp(16px, 4vw, 48px);
  --section-y: clamp(72px, 10vw, 140px);
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);

  color-scheme: light;
}

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

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--papel);
  color: var(--cafe);
  font: 400 1rem/1.7 var(--sans);
  -webkit-font-smoothing: antialiased;
}

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

figure {
  margin: 0;
}

h1, h2, h3, h4 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 500;
  line-height: 1.1;
  text-wrap: balance;
}

p {
  margin: 0;
}

a {
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--cafe);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -100px;
  z-index: 10;
  padding: 10px 16px;
  background: var(--cafe);
  color: var(--papel);
}

.skip-link:focus {
  top: 16px;
}

.wrap {
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

@media (prefers-reduced-motion: no-preference) {
  @view-transition {
    navigation: auto;
  }
}

/* Buttons and links */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.95em 1.6em;
  border: 0;
  border-radius: 999px;
  background: var(--cafe);
  color: var(--papel);
  font: 500 0.875rem/1 var(--sans);
  letter-spacing: 0.02em;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.btn:hover {
  background: var(--basalto);
}

.btn--ghost {
  background: none;
  color: var(--cafe);
  box-shadow: inset 0 0 0 1px var(--arena);
}

.btn--ghost:hover {
  background: var(--lino);
}

.text-link {
  font-size: 0.875rem;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 5px;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 28px;
  margin-top: 2rem;
}

/* Header */

.site-header {
  display: flex;
  align-items: center;
  gap: 12px 24px;
  padding: 18px var(--gutter);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--serif);
  font-size: 1.6rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  line-height: 1;
  text-transform: uppercase;
  text-decoration: none;
}

/* The mark is a mask so it takes the text colour on light and dark backgrounds. */
.brand__mark {
  flex: none;
  width: 38px;
  aspect-ratio: 280 / 344;
  background: currentColor;
  mask: url("../img/logo-marca.png") center / contain no-repeat;
}

.brand small {
  display: block;
  margin-top: 6px;
  font-family: var(--sans);
  font-size: 0.6rem;
  font-weight: 500;
  letter-spacing: 0.34em;
  color: var(--cafe-2);
}

/* The nav is a popover so phones get a no-JS menu; on desktop it is reset to an inline row. */
.site-nav {
  position: static;
  inset: auto;
  display: flex;
  align-items: center;
  gap: clamp(20px, 3vw, 40px);
  width: auto;
  height: auto;
  margin: 0 0 0 auto;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  overflow: visible;
}

.site-nav a {
  font-size: 0.875rem;
  color: var(--cafe-2);
  text-decoration: none;
  text-underline-offset: 6px;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--cafe);
  text-decoration: underline;
  text-decoration-thickness: 1px;
}

.site-nav__home,
.site-nav__close,
.site-nav__book,
.menu-toggle {
  display: none;
}

/* Hero: the three-photo strip from the printed brochures */

.hero {
  position: relative;
  display: flex;
  gap: 3px;
  height: min(86svh, 860px);
  min-height: 480px;
}

.panel {
  position: relative;
  flex: 1 1 0;
  min-width: 0;
  overflow: hidden;
  color: #fff;
  text-decoration: none;
  transition: flex-grow 0.8s var(--ease);
}

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

.panel::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgb(38 34 32 / 0.30) 0%, rgb(38 34 32 / 0.18) 45%, rgb(38 34 32 / 0.58) 100%);
}

.panel span {
  position: absolute;
  left: clamp(16px, 2.4vw, 32px);
  bottom: clamp(16px, 2.4vw, 32px);
  z-index: 1;
  font-family: var(--serif);
  font-size: clamp(1.25rem, 2vw, 1.75rem);
  line-height: 1.1;
  white-space: nowrap;
}

.panel:focus-visible {
  outline: 2px solid #fff;
  outline-offset: -8px;
}

@media (hover: hover) {
  .hero:has(.panel:hover) .panel:not(:hover) {
    flex-grow: 0.8;
  }

  .panel:hover {
    flex-grow: 1.5;
  }
}

.hero__title {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-content: center;
  padding-inline: var(--gutter);
  color: #fff;
  text-align: center;
  pointer-events: none;
  text-shadow: 0 1px 2px rgb(0 0 0 / 0.18), 0 2px 28px rgb(0 0 0 / 0.3);
  background: radial-gradient(ellipse 60% 32% at 50% 50%, rgb(38 34 32 / 0.32), transparent);
}

.hero__title h1 {
  font-size: clamp(3.2rem, 11vw, 9.5rem);
  font-weight: 400;
  letter-spacing: 0.08em;
  line-height: 0.9;
  text-transform: uppercase;
}

.hero__title h1 span {
  display: block;
  margin-top: 0.3em;
  font-size: 0.34em;
  letter-spacing: 0.2em;
}

.hero__title p {
  margin-top: 1.6rem;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.4em;
  text-transform: uppercase;
}

@media (prefers-reduced-motion: no-preference) {
  .panel {
    animation: rise 1.1s var(--ease) both;
  }

  .panel:nth-child(2) {
    animation-delay: 0.12s;
  }

  .panel:nth-child(3) {
    animation-delay: 0.24s;
  }

  .hero__title {
    animation: fade 1.2s ease 0.6s both;
  }
}

@media (prefers-reduced-motion: reduce) {
  .panel {
    transition: none;
  }
}

@keyframes rise {
  from {
    clip-path: inset(100% 0 0 0);
  }
  to {
    clip-path: inset(0 0 0 0);
  }
}

@keyframes fade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* Sections */

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

.section--dark {
  background: var(--basalto);
  color: var(--papel);
}

.section--dark h2 {
  font-size: clamp(2.5rem, 5.2vw, 4rem);
}

.page {
  padding-block: clamp(24px, 4vw, 64px) var(--section-y);
}

.page-head h1 {
  font-size: clamp(2.9rem, 6.4vw, 5.25rem);
  line-height: 1;
  letter-spacing: -0.01em;
}

.page-head p {
  max-width: 56ch;
  margin-top: 1.1rem;
  color: var(--cafe-2);
}

.page-head .tagline {
  margin-top: 0.8rem;
  font-family: var(--serif);
  font-size: clamp(1.45rem, 2.2vw, 1.75rem);
  font-style: italic;
  line-height: 1.3;
  color: var(--cafe);
}

.page-intro {
  display: grid;
  grid-template-columns: 7fr 5fr;
  gap: clamp(32px, 7vw, 112px);
  align-items: center;
}

.page-intro__media img,
.split__media img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
}

.page-intro__media--top img {
  object-position: 50% 0;
}

/* Home */

.welcome {
  display: grid;
  grid-template-columns: 7fr 5fr;
  gap: 24px clamp(32px, 7vw, 112px);
  align-items: end;
}

.lead {
  max-width: 18ch;
  font-size: clamp(2.1rem, 4vw, 3.25rem);
  line-height: 1.08;
}

.welcome p {
  max-width: 46ch;
  color: var(--cafe-2);
}

.welcome .text-link {
  display: inline-block;
  margin-top: 1.25rem;
  color: var(--cafe);
}

.services {
  display: grid;
  grid-template-columns: 4fr 8fr;
  gap: 24px clamp(32px, 7vw, 112px);
  align-items: start;
  margin-top: clamp(72px, 10vw, 136px);
}

.services > h2 {
  font-size: clamp(2.1rem, 3.4vw, 2.75rem);
}

.services__list {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--arena);
}

.services__list li {
  border-bottom: 1px solid var(--arena);
}

.services__list a {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas:
    "name from"
    "desc desc";
  align-items: baseline;
  gap: 0.5rem 32px;
  padding-block: clamp(1.5rem, 2.5vw, 2rem);
  text-decoration: none;
}

.services__list h3 {
  grid-area: name;
  font-size: clamp(2rem, 3.6vw, 3rem);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.14em;
}

.services__list a:hover h3 {
  text-decoration-line: underline;
}

.services__desc {
  grid-area: desc;
  max-width: 56ch;
  color: var(--cafe-2);
}

.services__from {
  grid-area: from;
  font-size: 0.875rem;
  color: var(--cafe-2);
  white-space: nowrap;
}

.services__from strong {
  margin-left: 0.3em;
  font-family: var(--serif);
  font-size: 1.6rem;
  font-weight: 600;
  color: var(--cafe);
  font-variant-numeric: lining-nums;
}

/* About */

.team {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px clamp(24px, 4vw, 56px);
  margin: clamp(56px, 7vw, 96px) 0 0;
  padding-top: 1.75rem;
  border-top: 1px solid var(--arena);
}

.team dt {
  font-family: var(--serif);
  font-size: 1.75rem;
  line-height: 1.2;
}

.team dd {
  max-width: 34ch;
  margin: 0.4rem 0 0;
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--cafe-2);
}

.tecnicas {
  padding-block: clamp(64px, 8vw, 112px);
  background: var(--lino);
}

.tecnicas__intro {
  max-width: 40ch;
  color: var(--cafe-2);
}

.tecnicas__list {
  max-width: 30ch;
  margin-top: 1rem;
  font-family: var(--serif);
  font-size: clamp(2rem, 4.8vw, 4rem);
  font-style: italic;
  line-height: 1.12;
  text-wrap: balance;
}

/* Service menus */

.split {
  display: grid;
  grid-template-columns: 7fr 5fr;
  grid-template-areas:
    "head media"
    "body media";
  column-gap: clamp(32px, 7vw, 112px);
  align-items: start;
}

.split > .page-head {
  grid-area: head;
  margin-bottom: clamp(32px, 4vw, 56px);
}

.split > .menu {
  grid-area: body;
}

.split__media {
  grid-area: media;
  position: sticky;
  top: 32px;
}

.menu {
  margin: 0;
  padding: 0;
  list-style: none;
}

.menu > .item {
  padding-block: 1.75rem;
  border-top: 1px solid var(--arena);
}

.menu > .item:last-child {
  border-bottom: 1px solid var(--arena);
}

.item__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 32px;
}

/* A single price stays on the title line even when the subtitle wraps. */
.item__head:has(> .price) {
  display: grid;
  grid-template-columns: 1fr auto;
}

.item h2,
.item h3 {
  font-size: 1.75rem;
}

.item__sub {
  margin-top: 0.3rem;
  font-size: 0.875rem;
  color: var(--cafe-2);
}

.item > p {
  max-width: 60ch;
  margin-top: 0.9rem;
}

.prices {
  display: flex;
  gap: 28px;
  margin: 0;
}

.prices dt {
  font-size: 0.75rem;
  color: var(--cafe-2);
}

.prices dd,
.price {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.6rem;
  font-weight: 600;
  line-height: 1.1;
  font-variant-numeric: lining-nums;
}

.includes {
  margin: 0.6rem 0 0;
  padding-left: 1.1rem;
}

.includes li::marker {
  color: var(--arena);
}

.follow-up {
  font-size: 0.875rem;
  color: var(--cafe-2);
}

.menu--grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  column-gap: clamp(32px, 5vw, 80px);
  border-bottom: 1px solid var(--arena);
}

.menu--grid > .item:last-child {
  border-bottom: 0;
}

/* Laser price lists */

.laser {
  display: grid;
  grid-template-columns: 4fr 7fr;
  gap: clamp(40px, 7vw, 112px);
  align-items: start;
  margin-top: clamp(64px, 9vw, 120px);
}

.laser h2 {
  margin-bottom: 1.25rem;
  font-size: clamp(1.75rem, 2.6vw, 2.1rem);
}

.pricelist {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--arena);
}

.pricelist li {
  display: flex;
  align-items: baseline;
  gap: 0.75em;
  padding-block: 0.55rem;
  break-inside: avoid;
}

.pricelist li span:first-child {
  display: flex;
  flex: 1;
  gap: 0.75em;
}

.pricelist li span:first-child::after {
  content: "";
  flex: 1;
  border-bottom: 1px dotted var(--cafe-2);
  opacity: 0.45;
  transform: translateY(-0.35em);
}

.pricelist li span:last-child {
  font-variant-numeric: tabular-nums;
}

.pricelist--cols {
  columns: 2;
  column-gap: clamp(32px, 5vw, 64px);
}

.note {
  margin-top: 1.25rem;
  font-size: 0.875rem;
  color: var(--cafe-2);
}

/* Cosmetology */

.cosme-head {
  display: grid;
  grid-template-columns: 6fr 6fr;
  gap: clamp(32px, 7vw, 112px);
  align-items: center;
  margin-bottom: clamp(56px, 7vw, 96px);
}

.cosme-head__media {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.cosme-head__media img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
}

.cosme-head__media img:last-child {
  margin-top: 25%;
}

.group-title {
  margin-bottom: 1.25rem;
  font-size: clamp(1.9rem, 3vw, 2.4rem);
}

.group-intro {
  max-width: 58ch;
  margin: -0.5rem 0 1.5rem;
  color: var(--cafe-2);
}

.menu + .group-title {
  margin-top: clamp(56px, 7vw, 96px);
}

/* Promos */

.promos {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin: clamp(32px, 4vw, 56px) 0 0;
  padding: 0;
  list-style: none;
}

.promos li {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 2rem;
  padding: 0.5rem clamp(20px, 3vw, 48px);
  border-left: 1px solid rgb(250 248 245 / 0.22);
}

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

.promos li p:first-child {
  max-width: 22ch;
  font-size: 1.05rem;
  line-height: 1.5;
  color: rgb(250 248 245 / 0.82);
}

.promos__price {
  font-family: var(--serif);
  font-size: clamp(2.6rem, 4.4vw, 3.6rem);
  font-weight: 500;
  line-height: 1;
  font-variant-numeric: lining-nums;
}

/* Booking band at the end of each page */

.book {
  padding-block: clamp(56px, 8vw, 104px);
  background: var(--lino);
}

.book__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px 48px;
}

.book h2 {
  font-size: clamp(2.1rem, 4vw, 3.25rem);
}

.book p {
  max-width: 46ch;
  margin-top: 0.8rem;
  color: var(--cafe-2);
}

.book .actions {
  margin-top: 0;
}

/* Booking page */

.contact__blocks {
  display: grid;
  grid-template-columns: repeat(2, auto);
  justify-content: start;
  gap: 0 clamp(32px, 5vw, 72px);
  margin-top: clamp(40px, 5vw, 56px);
}

/* Subgrid keeps both WhatsApp buttons on one line when a heading wraps. */
.contact__blocks > div {
  display: grid;
  grid-row: span 3;
  grid-template-rows: subgrid;
  justify-items: start;
  align-items: start;
}

.contact__blocks h2,
.places h2 {
  margin-bottom: 1rem;
  font-size: 1.5rem;
}

.contact__blocks h2 {
  align-self: end;
}

.contact__blocks p {
  margin-top: 0.9rem;
}

.places {
  margin-top: 3rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--arena);
}

.places p {
  color: var(--cafe-2);
}

/* Footer */

.site-footer {
  padding-block: clamp(48px, 6vw, 72px);
  background: var(--basalto);
  color: rgb(250 248 245 / 0.72);
  font-size: 0.875rem;
}

.site-footer__inner {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 32px 64px;
  align-items: end;
}

.brand--footer {
  color: var(--papel);
  font-size: 1.3rem;
}

.brand--footer .brand__mark {
  width: 44px;
}

.brand--footer small {
  color: rgb(250 248 245 / 0.6);
}

.brand--footer + p {
  margin-top: 1.25rem;
}

.site-footer__contact {
  display: flex;
  flex-wrap: wrap;
  gap: 20px 48px;
  margin: 0;
}

.site-footer__contact dd {
  margin: 0.2rem 0 0;
}

.site-footer__contact a {
  color: var(--papel);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

/* Responsive */

@media (max-width: 960px) {
  .site-nav + .btn {
    margin-left: auto;
  }

  .menu-toggle {
    display: inline-flex;
  }

  .site-nav:not(:popover-open) {
    display: none;
  }

  .site-nav:popover-open {
    position: fixed;
    inset: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
    padding: 18px var(--gutter) 48px;
    background: var(--papel);
    overflow-y: auto;
  }

  .site-nav__close {
    display: inline-flex;
    align-self: flex-end;
    margin-bottom: clamp(32px, 9vh, 88px);
  }

  .site-nav__home {
    display: block;
  }

  .site-nav a {
    padding-block: 0.3rem;
    font-family: var(--serif);
    font-size: 2.4rem;
    line-height: 1.2;
    color: var(--cafe);
    text-underline-offset: 8px;
  }

  .site-nav .site-nav__book {
    display: inline-flex;
    margin-top: 2.5rem;
    padding: 0.95em 1.6em;
    font: 500 0.875rem/1 var(--sans);
    color: var(--papel);
  }

  .page-intro,
  .welcome,
  .services,
  .laser,
  .cosme-head,
  .site-footer__inner {
    grid-template-columns: 1fr;
  }

  .split {
    grid-template-columns: 1fr;
    grid-template-areas:
      "head"
      "media"
      "body";
  }

  .split__media {
    position: static;
    margin-bottom: 40px;
  }

  .page-intro__media img,
  .split__media img {
    aspect-ratio: 3 / 2;
  }

  .menu--grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .site-header {
    gap: 8px;
    padding-block: 14px;
  }

  .site-header .btn {
    padding: 0.85em 1em;
  }

  .brand {
    gap: 7px;
    font-size: 1.1rem;
    letter-spacing: 0.12em;
  }

  .brand small {
    margin-top: 5px;
    font-size: 0.47rem;
    letter-spacing: 0.26em;
  }

  .brand__mark {
    width: 28px;
  }

  .hero {
    height: 78svh;
    min-height: 460px;
  }

  .panel span {
    left: 50%;
    bottom: 16px;
    font-size: 1.1rem;
    writing-mode: vertical-rl;
    transform: translateX(-50%) rotate(180deg);
  }

  .hero__title p {
    letter-spacing: 0.3em;
  }

  .services__list a {
    grid-template-columns: 1fr;
    grid-template-areas:
      "name"
      "desc"
      "from";
    gap: 0.4rem;
  }

  .team {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .pricelist--cols {
    columns: 1;
  }

  .promos {
    grid-template-columns: 1fr;
  }

  .promos li,
  .promos li:first-child {
    gap: 0.75rem;
    padding: 1.5rem 0;
    border-left: 0;
    border-top: 1px solid rgb(250 248 245 / 0.22);
  }

  .contact__blocks {
    grid-template-columns: 1fr;
    row-gap: 0;
  }

  .contact__blocks > div + div {
    margin-top: 2.5rem;
  }
}

/* Below 360px the header cannot fit both buttons; booking moves into the menu. */
@media (max-width: 359px) {
  .site-nav + .btn {
    display: none;
  }

  .menu-toggle {
    margin-left: auto;
  }
}
