/*
 * PARSO NAILS - parsonails.com
 *
 * The palette and the materials are not invented here. They are read off the
 * studio's own renders: the terracotta reception wall, the brass counter, the
 * blush of the velvet chairs, the cream of the walls, the terrazzo underfoot.
 * The identity's design tokens supply the same values, which is the point -
 * the site and the room are meant to be recognisably one place.
 *
 * The one structural idea is borrowed from the room too. The salon's polish
 * shelving is cut into soft asymmetric blobs, so the service families are
 * shaped that way rather than as a grid of identical rounded rectangles.
 *
 * Motion: one orchestrated moment on arrival, when the mark on the wall comes
 * up the way the real backlit sign does. After that, nothing moves unless a
 * person moves it.
 */

/* ------------------------------------------------------------- fonts -- */
/* Self-hosted. No request leaves this domain for a typeface. */
@font-face {
  font-family: 'Parso AR';
  src: url('/fonts/NotoSansArabic-Regular.woff2') format('woff2');
  font-weight: 400; font-display: swap;
}
@font-face {
  font-family: 'Parso AR';
  src: url('/fonts/NotoSansArabic-Bold.woff2') format('woff2');
  font-weight: 700; font-display: swap;
}
@font-face {
  font-family: 'Parso EN';
  src: url('/fonts/Carlito-Regular.woff2') format('woff2');
  font-weight: 400; font-display: swap;
}
@font-face {
  font-family: 'Parso EN';
  src: url('/fonts/Carlito-Bold.woff2') format('woff2');
  font-weight: 700; font-display: swap;
}
@font-face {
  font-family: 'Parso Display';
  src: url('/fonts/LiberationSerif-Regular.woff2') format('woff2');
  font-weight: 400; font-display: swap;
}

/* ------------------------------------------------------------ tokens -- */
:root {
  --ink:    #28201D;
  --clay:   #805341;
  --blush:  #D9A9A2;
  --brass:  #B08D57;
  --ivory:  #F7F1E9;
  --sand:   #E6D8CA;
  --rose:   #CFA99D;
  --line:   #E2D5CC;
  --muted:  #78685F;

  --ar: 'Parso AR', 'Segoe UI', sans-serif;
  --en: 'Parso EN', 'Segoe UI', sans-serif;
  --display: 'Parso Display', Georgia, serif;

  /* A modular scale at 1.25, so headings relate to body text rather than
     being picked one at a time. */
  --t-sm:  0.82rem;
  --t-base: 1.0625rem;
  --t-md:  1.33rem;
  --t-lg:  1.66rem;
  --t-xl:  2.6rem;
  --t-2xl: clamp(2.6rem, 7vw, 4.4rem);

  --gutter: clamp(1.25rem, 5vw, 5rem);
  --ease: cubic-bezier(.22, .61, .36, 1);
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--ivory);
  color: var(--ink);
  font: 400 var(--t-base)/1.85 var(--ar), var(--en);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

html[lang='en'] body { font-family: var(--en), var(--ar); line-height: 1.7; }

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

h1, h2, h3 { font-weight: 700; line-height: 1.3; margin: 0; }

::selection { background: var(--blush); color: var(--ink); }

:focus-visible {
  outline: 2px solid var(--clay);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip {
  position: absolute; inset-inline-start: -9999px; top: 0;
  background: var(--clay); color: #fff; padding: .7rem 1.2rem; z-index: 99;
}
.skip:focus { inset-inline-start: 0; }

/* ----------------------------------------------------------- the bar -- */
.bar {
  position: fixed; inset-block-start: 0; inset-inline: 0; z-index: 40;
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem;
  padding: .85rem var(--gutter);
  /* Transparent over the hero, then it takes on the page ground once the
     photograph has scrolled past. Set by app.js, not by scroll-linked CSS,
     so it is one class change rather than work on every frame. */
  background: transparent;
  transition: background .45s var(--ease), box-shadow .45s var(--ease);
}
.bar.is-landed {
  background: color-mix(in srgb, var(--ivory) 92%, transparent);
  backdrop-filter: blur(14px);
  box-shadow: 0 1px 0 var(--line);
}

.bar__mark { display: flex; align-items: center; gap: .6rem; text-decoration: none; }
.bar__mark img { filter: brightness(0) invert(1); transition: filter .45s var(--ease); }
.bar.is-landed .bar__mark img { filter: none; }

.bar__name {
  font-size: var(--t-sm); letter-spacing: .14em; color: #fff;
  transition: color .45s var(--ease);
}
.bar.is-landed .bar__name { color: var(--ink); }

.bar__nav { display: flex; gap: 1.6rem; }
.bar__nav a {
  color: #fff; text-decoration: none; font-size: var(--t-sm);
  padding-block: .3rem;
  border-block-end: 1px solid transparent;
  transition: color .45s var(--ease), border-color .25s var(--ease);
}
.bar.is-landed .bar__nav a { color: var(--ink); }
.bar__nav a:hover { border-block-end-color: var(--brass); }

.bar__end { display: flex; align-items: center; gap: .7rem; }

.lang {
  background: none; border: 1px solid currentColor; color: #fff;
  border-radius: 999px; padding: .28rem .7rem;
  font: 400 var(--t-sm)/1 var(--en); letter-spacing: .1em; cursor: pointer;
  transition: color .45s var(--ease), background .25s var(--ease);
}
.bar.is-landed .lang { color: var(--ink); }
.lang:hover { background: var(--brass); border-color: var(--brass); color: #fff; }

@media (max-width: 760px) { .bar__nav { display: none; } }

/* --------------------------------------------------------- the button -- */
.btn {
  display: inline-block;
  background: var(--clay); color: var(--ivory);
  text-decoration: none; border: 0; cursor: pointer;
  padding: .95rem 2.1rem;
  border-radius: 999px;
  font: 700 var(--t-base)/1 var(--ar);
  transition: transform .3s var(--ease), box-shadow .3s var(--ease), background .3s var(--ease);
}
.btn:hover { background: #6d4536; transform: translateY(-2px); box-shadow: 0 10px 26px rgba(40, 32, 29, .22); }
.btn:active { transform: translateY(0); }
.btn--sm { padding: .5rem 1.15rem; font-size: var(--t-sm); }
.btn--wide { inline-size: 100%; padding-block: 1.05rem; }
.btn--quiet {
  background: transparent; color: var(--clay);
  border: 1px solid var(--rose); padding: .7rem 1.6rem;
}
.btn--quiet:hover { background: var(--clay); color: var(--ivory); border-color: var(--clay); }

/* The glow under the hero button is the same warm light as the sign on the
   wall behind it, so the two read as one lighting scheme. */
.btn--glow { box-shadow: 0 0 0 0 rgba(176, 141, 87, .55); }
.btn--glow:hover { box-shadow: 0 0 34px 6px rgba(176, 141, 87, .38); }

/* ----------------------------------------------------------- the hero -- */
.hero {
  position: relative;
  min-block-size: 100svh;
  display: grid;
  align-items: end;
  justify-items: start;
  overflow: hidden;
  isolation: isolate;
}

.hero__art { position: absolute; inset: 0; z-index: -2; }
.hero__art img {
  inline-size: 100%; block-size: 100%; object-fit: cover;
  /* Biased upward, so the crop keeps the lit sign in frame on a wide screen
     instead of centring on the counter below it. */
  object-position: 50% 38%;
  /* The settle: the room comes to rest rather than snapping into place. */
  animation: settle 2.4s var(--ease) both;
}

.hero__veil {
  position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(110% 80% at 50% 30%, transparent 0%, rgba(40,32,29,.22) 52%, rgba(40,32,29,.60) 100%),
    linear-gradient(to bottom, rgba(40,32,29,.40) 0%, transparent 24%, rgba(40,32,29,.78) 100%);
}

/*
 * The sign coming on.
 *
 * The studio's mark is already on that wall and already backlit; this is the
 * light behind it warming up, not a second logo. It blooms once on arrival
 * and then holds - the single orchestrated moment on the page.
 */
.hero__halo {
  position: absolute; inset-block-start: 4%; inset-inline: 0;
  margin-inline: auto;
  inline-size: min(620px, 80vw); aspect-ratio: 1.15;
  background: radial-gradient(ellipse at center,
    rgba(240, 200, 170, .38) 0%,
    rgba(176, 141, 87, .18) 38%,
    transparent 66%);
  filter: blur(26px);
  mix-blend-mode: screen;
  animation: bloom 3s var(--ease) .4s both;
  pointer-events: none;
}

.hero__body {
  position: relative;
  padding: 0 var(--gutter) clamp(5rem, 14vh, 9rem);
  display: grid; justify-items: start; gap: 1.8rem;
  text-align: start;
}

.hero__line {
  margin: 0;
  color: var(--ivory);
  font-size: clamp(1.5rem, 3.6vw, 2.5rem);
  font-weight: 400;
  line-height: 1.75;
  max-inline-size: 20ch;
  text-shadow: 0 2px 30px rgba(40, 32, 29, .55);
  animation: rise 1.3s var(--ease) 1s both;
}

.hero .btn--glow { animation: rise 1.3s var(--ease) 1.3s both; }

.hero__scroll {
  position: absolute; inset-block-end: 2rem; inset-inline-end: var(--gutter);
  inline-size: 1px; block-size: 52px;
  background: linear-gradient(to bottom, transparent, rgba(247,241,233,.7));
  animation: rise 1.3s var(--ease) 1.7s both;
}
.hero__scroll span {
  position: absolute; inset-block-end: 0; inset-inline-start: -2px;
  inline-size: 5px; block-size: 5px; border-radius: 50%;
  background: var(--brass);
}

@keyframes settle { from { scale: 1.08; } to { scale: 1; } }
@keyframes bloom  { from { opacity: 0; scale: .7; } to { opacity: 1; scale: 1; } }
@keyframes rise   { from { opacity: 0; translate: 0 22px; } to { opacity: 1; translate: 0 0; } }

/* -------------------------------------------------------- section head -- */
.sec { padding-inline: var(--gutter); margin-block-end: 2.6rem; }
.sec h2 {
  font-size: var(--t-xl);
  letter-spacing: -.01em;
}
html[lang='en'] .sec h2 {
  font-family: var(--display);
  letter-spacing: .1em;
  font-weight: 400;
}
.sec__note { color: var(--muted); margin: .6rem 0 0; max-inline-size: 54ch; }

/* -------------------------------------------------------- the services -- */
.services { padding-block: clamp(4rem, 10vw, 7.5rem) 0; }

.families {
  padding-inline: var(--gutter);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(255px, 1fr));
  gap: 1.15rem;
}

/*
 * The blob. The salon's polish shelves are cut as soft asymmetric lobes, so
 * each family takes a different one rather than every tile sharing a single
 * border-radius. Four shapes, cycled - enough that no two neighbours match,
 * few enough that the wall still looks deliberate.
 */
.family {
  background: var(--sand);
  border: 1px solid transparent;
  padding: 1.7rem 1.6rem 1.35rem;
  text-align: start;
  cursor: pointer;
  color: inherit;
  font: inherit;
  transition: background .3s var(--ease), border-color .3s var(--ease),
              transform .3s var(--ease), border-radius .5s var(--ease);
}
.family:nth-child(4n+1) { border-radius: 58% 42% 46% 54% / 44% 52% 48% 56%; }
.family:nth-child(4n+2) { border-radius: 44% 56% 60% 40% / 56% 44% 56% 44%; }
.family:nth-child(4n+3) { border-radius: 52% 48% 38% 62% / 48% 60% 40% 52%; }
.family:nth-child(4n)   { border-radius: 40% 60% 54% 46% / 60% 42% 58% 40%; }

.family:hover { background: var(--blush); transform: translateY(-4px); }
.family.is-open {
  background: var(--ivory);
  border-color: var(--rose);
  border-radius: 28px;
  grid-column: 1 / -1;
}

.family__top { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; }
.family__name { font-size: var(--t-lg); font-weight: 700; }
.family__count { color: var(--muted); font-size: var(--t-sm); white-space: nowrap; }
.family__from { color: var(--clay); font-size: var(--t-sm); margin-block-start: .35rem; }

.family__list { display: none; margin-block-start: 1.5rem; }
.family.is-open .family__list { display: block; }

.item {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 1.2rem;
  padding-block: .85rem;
  border-block-start: 1px solid var(--line);
}
.item:first-child { border-block-start: 0; }
.item__name { font-weight: 700; }
.item__meta { color: var(--muted); font-size: var(--t-sm); }
.item__price { color: var(--clay); font-weight: 700; white-space: nowrap; }
.item__price small { font-weight: 400; font-size: .72em; color: var(--muted); }

/* ---------------------------------------------------------- the rooms -- */
.studio { padding-block: clamp(4rem, 10vw, 7.5rem) 0; }

.rooms {
  padding-inline: var(--gutter);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1rem;
}
.room { margin: 0; position: relative; overflow: hidden; border-radius: 26px; }
.room--wide { grid-column: span 2; }
@media (max-width: 800px) { .room--wide { grid-column: span 1; } }

.room img {
  inline-size: 100%; block-size: 100%; object-fit: cover;
  aspect-ratio: 16 / 10;
  transition: scale .8s var(--ease);
}
.room:hover img { scale: 1.04; }

.room figcaption {
  position: absolute; inset-block-end: 0; inset-inline: 0;
  padding: 2.4rem 1.4rem 1.1rem;
  color: var(--ivory); font-size: var(--t-sm); letter-spacing: .05em;
  background: linear-gradient(to top, rgba(40,32,29,.72), transparent);
}

/* --------------------------------------------------------- the asking -- */
.book {
  padding-block: clamp(4rem, 10vw, 7.5rem);
  margin-block-start: clamp(4rem, 10vw, 7.5rem);
  background: var(--sand);
}

.form {
  padding-inline: var(--gutter);
  max-inline-size: 46rem;
  display: grid; gap: 1.15rem;
}

.field { display: grid; gap: .4rem; border: 0; padding: 0; margin: 0; min-inline-size: 0; }
.field > span, .field legend { font-size: var(--t-sm); color: var(--muted); padding: 0; }

.field input, .field select, .field textarea {
  font: inherit; color: inherit;
  background: var(--ivory);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: .8rem 1rem;
  inline-size: 100%;
  transition: border-color .25s var(--ease), box-shadow .25s var(--ease);
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: 0;
  border-color: var(--clay);
  box-shadow: 0 0 0 3px rgba(128, 83, 65, .14);
}
.field textarea { resize: vertical; }

.row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.15rem; }
@media (max-width: 620px) { .row { grid-template-columns: 1fr; } }

.picks { display: flex; flex-wrap: wrap; gap: .5rem; }

.pick {
  border: 1px solid var(--rose); background: transparent; color: var(--ink);
  border-radius: 999px; padding: .5rem 1rem;
  font: inherit; font-size: var(--t-sm); cursor: pointer;
  transition: background .25s var(--ease), color .25s var(--ease), border-color .25s var(--ease);
}
.pick:hover { border-color: var(--clay); }
.pick.is-on { background: var(--clay); border-color: var(--clay); color: var(--ivory); }

.tally { margin: .8rem 0 0; color: var(--clay); font-weight: 700; min-block-size: 1.6em; }

.check { display: flex; align-items: center; gap: .6rem; cursor: pointer; }
.check input { inline-size: 1.05rem; block-size: 1.05rem; accent-color: var(--clay); }

.formsay { margin: 0; min-block-size: 1.6em; }
.formsay.is-bad { color: #8C3A2E; }
.formsay.is-good { color: #416653; }

/* ---------------------------------------------------------- the visit -- */
.visit {
  display: grid; grid-template-columns: 1fr 1fr; align-items: stretch;
  gap: 0;
}
@media (max-width: 860px) { .visit { grid-template-columns: 1fr; } }

.visit__card {
  padding: clamp(3rem, 8vw, 6rem) var(--gutter);
  display: grid; align-content: center; gap: 1rem; justify-items: start;
}
.visit__card h2 { font-size: var(--t-xl); }
.visit__address { margin: 0; max-inline-size: 30ch; line-height: 2; }
.visit__hours { margin: 0; color: var(--muted); }
.visit__hours b { color: var(--ink); font-family: var(--en); letter-spacing: .04em; }

.visit__art img { inline-size: 100%; block-size: 100%; object-fit: cover; min-block-size: 320px; }

/* ----------------------------------------------------------- the foot -- */
.foot {
  background: var(--ink); color: var(--ivory);
  padding: 3rem var(--gutter);
  display: grid; justify-items: center; gap: .7rem; text-align: center;
}
.foot img { filter: brightness(0) invert(1); opacity: .85; }
.foot p { margin: 0; font-size: var(--t-sm); letter-spacing: .1em; }
.foot__fine { color: rgba(247,241,233,.55); letter-spacing: 0; }

/* -------------------------------------------------- respect the setting -- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-delay: 0ms !important;
    transition-duration: .001ms !important;
  }
}
