/* Studi demo template, Foschia look (frosted light): white, one blue-grey haze, ink, and the client's logo colour
   only on the booking button. Always light. render() writes --brand and --brand-ink (logo colour and its readable ink) inline. */

:root {
  color-scheme: light;
  --brand: #2f6f8f;
  --brand-ink: #fff;
  --bg: #fff;
  --haze: #d3e1ea;
  --ink: #141414;
  --muted: #474747;
  --line: rgb(20 20 20 / .18);
  --radius: 16px;
  --gutter: clamp(16px, 4vw, 56px);
  --section: clamp(64px, 7vw, 104px);
  --f-sans: 'Hanken Grotesk', system-ui, sans-serif;
  --f-mono: 'JetBrains Mono', ui-monospace, monospace;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { background: var(--bg); color: var(--ink); font: 400 17px/1.5 var(--f-sans); -webkit-font-smoothing: antialiased; overflow-x: clip; }
img { display: block; width: 100%; height: 100%; object-fit: cover; }
a { color: inherit; text-underline-offset: 4px; }
ul { list-style: none; }
h1, h2, h3 { font-weight: inherit; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }
.demo-note { color: var(--muted); font-size: 14px; line-height: 1.4; }

/* type roles */
.hero h1, .big { font-weight: 600; letter-spacing: -.045em; }
h2, .tn, .acc summary { font-weight: 500; letter-spacing: -.02em; }
.about h2, .treat h2, .team-intro h2, .ph-head h2 { font-size: clamp(36px, 4vw, 60px); line-height: 1.05; }
.label { display: block; font: 400 13px/1.3 var(--f-mono); letter-spacing: .02em; text-transform: uppercase; font-variant-numeric: tabular-nums; }
.fit { container-type: inline-size; }

/* hero: name, lead and button on the left, one photo on the right, on a soft haze */
.hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 64px; padding: 0 var(--gutter) 64px; background: radial-gradient(70% 90% at 80% 20%, var(--haze), transparent 75%), var(--bg); }
.hero.solo .hero-text { grid-column: 1 / -1; }
.bar { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px 32px; padding: 20px 0; font-size: 15px; }
.logo { font-weight: 600; letter-spacing: -.02em; }
.logo, .links a { text-decoration: none; padding: 10px 0; }
.links { display: flex; gap: 24px; }
.links a:hover { text-decoration: underline; }
.hero-text { align-self: center; min-width: 0; padding: 72px 0; }
.hero h1 { font-size: clamp(48px, 6.1vw, 88px); line-height: 1; text-wrap: balance; }
.lead { font-size: 19px; max-width: 38ch; margin: 24px 0 28px; text-wrap: pretty; }
.btn { display: inline-flex; align-items: center; min-height: 52px; padding: 14px 22px; border-radius: var(--radius); background: var(--brand); color: var(--brand-ink); font-size: 16px; font-weight: 500; text-decoration: none; }
.btn:hover { text-decoration: underline; }
.btn:active { transform: translateY(1px); }
.hero-photo { align-self: center; aspect-ratio: 4 / 3; border-radius: var(--radius); overflow: hidden; background: var(--haze); }

/* lo studio: text left, tall photo right */
.about { display: grid; grid-template-columns: repeat(12, 1fr); gap: var(--gutter); align-items: start; padding: var(--section) var(--gutter) 0; }
.about-text { grid-column: 1 / 7; }
.about.solo .about-text { grid-column: 1 / 9; }
.about figure { grid-column: 8 / 13; aspect-ratio: 4 / 5; border-radius: var(--radius); overflow: hidden; }
.about h2 { margin-bottom: 32px; }
.about p { font-size: clamp(17px, 1rem + .25vw, 19px); max-width: 56ch; margin-bottom: 1em; text-wrap: pretty; }
.sign { font-weight: 500; }

/* trattamenti: groups as rows, label left, items right */
.treat { padding: var(--section) var(--gutter) 0; }
.treat h2 { margin-bottom: 40px; }
/* white sections stack: each pads only its top, the haze contact block keeps its own gap */
.group { display: grid; grid-template-columns: minmax(0, 5fr) 7fr; gap: 12px 32px; border-top: 1px solid var(--line); padding: 16px 0 40px; }
.group h3 { padding-top: 16px; }
.group li { display: flex; justify-content: space-between; gap: 24px; padding: 14px 0; border-bottom: 1px solid rgb(20 20 20 / .1); }
.group li:last-child { border-bottom: 0; }
.tn { font-size: 22px; line-height: 1.2; }
.tn small { display: block; margin-top: 4px; font-size: 16px; font-weight: 400; letter-spacing: 0; line-height: 1.45; color: var(--muted); }
.meta { white-space: nowrap; padding-top: 6px; }

/* team: accordion, the open panel on haze */
.team { padding: var(--section) var(--gutter) 0; }
.team-intro { display: grid; grid-template-columns: 5fr 1fr 5fr; gap: 24px; margin-bottom: 48px; align-items: end; }
.team-intro p { grid-column: 3; font-size: 18px; }
.acc { display: flex; min-height: 520px; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.acc details { position: relative; flex: 1 1 0; min-width: 64px; overflow: hidden; border-inline-start: 1px solid var(--line); transition: flex-grow .45s cubic-bezier(.2, .7, .2, 1); }
.acc details:first-child { border-inline-start: 0; }
.acc details[open] { flex-grow: 6; padding-right: 50%; background: var(--haze); }
.acc details[open]:not(:has(figure)) { flex-grow: 3; padding-right: 0; }
.acc summary { position: absolute; inset: 0; list-style: none; cursor: pointer; padding: 20px; font-size: 20px; writing-mode: vertical-rl; transform: rotate(180deg); }
.acc summary::-webkit-details-marker { display: none; }
.acc summary::after { content: " +"; font-family: var(--f-mono); }
.acc details[open] summary::after { content: none; }
.acc details[open] summary { position: static; writing-mode: horizontal-tb; transform: none; font-size: clamp(28px, 2.8vw, 40px); line-height: 1.05; padding: 24px; }
.acc-body { padding: 0 24px 24px; font-size: 18px; line-height: 1.45; }
.role { font-weight: 600; margin-bottom: 8px; }
.acc figure { position: absolute; top: 0; right: 0; width: 50%; height: 100%; }

/* foto: a board of tiles, the first photo takes 2x2 */
.photos { display: grid; grid-template-columns: repeat(12, 1fr); grid-auto-rows: 34svh; grid-auto-flow: dense; gap: 8px; padding: var(--section) var(--gutter) 0; }
.tile { grid-column: span 4; position: relative; overflow: hidden; border-radius: var(--radius); }
.photos figure:nth-of-type(1) { grid-column: span 8; grid-row: span 2; }
.photos .last2 { grid-column: span 8; }
.photos .last3 { grid-column: 1 / -1; }
.ph-head { display: flex; align-items: flex-end; padding: 24px; background: var(--haze); }

/* contatti: the phone number as wide as the page, the details in one row below it */
.contact { margin-top: var(--section); padding: var(--section) var(--gutter); background: var(--haze); }
.call { font-size: 17px; font-weight: 500; margin-bottom: 8px; }
.big { display: block; width: fit-content; white-space: nowrap; line-height: .95; text-decoration: none; font-size: calc(100cqw / var(--em)); }
/* the default underline scales with the giant type: a hairline under the number instead */
.big:hover, .big:focus-visible { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: .06em; }
.notes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px 32px; margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--line); font-size: 17px; }
.nl { font-size: 13px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.notes a { text-decoration: none; }
.notes a:hover { text-decoration: underline; }
.hours { display: grid; grid-template-columns: max-content max-content; gap: 4px 24px; }
.hours dd { font-variant-numeric: tabular-nums; }

.foot { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 8px 24px; padding: 28px var(--gutter) 32px; }
.foot b { font-weight: 600; font-size: 20px; letter-spacing: -.02em; }

/* ======================= phone ======================= */
@media (max-width: 760px) {
  .hero { grid-template-columns: minmax(0, 1fr); padding-bottom: 32px; }
  .bar { gap: 12px; padding: 16px 0; }
  .links a:not([href="#contatti"]) { display: none; }
  .hero-text { padding: 40px 0 32px; }
  .hero h1 { font-size: clamp(40px, 12.3vw, 64px); }
  .lead { font-size: 17px; }
  .about { grid-template-columns: 1fr; }
  .about-text, .about.solo .about-text, .about figure { grid-column: 1; }
  .group { grid-template-columns: 1fr; padding-bottom: 24px; }
  .group li { flex-direction: column; gap: 6px; }
  .team-intro { grid-template-columns: 1fr; margin-bottom: 32px; }
  .team-intro p { grid-column: 1; }
  .acc { flex-direction: column; min-height: 0; }
  .acc details, .acc details[open] { flex: none; min-height: 64px; padding-right: 0; border-inline-start: 0; border-top: 1px solid var(--line); }
  .acc details:first-child { border-top: 0; }
  .acc summary, .acc details[open] summary { position: relative; inset: auto; writing-mode: horizontal-tb; transform: none; font-size: 18px; padding: 20px; }
  .acc details[open] summary { font-size: 28px; }
  .acc-body { padding: 0 20px 20px; font-size: 17px; }
  .acc figure { position: static; width: 100%; height: auto; aspect-ratio: 4 / 5; }
  .photos { grid-template-columns: 1fr 1fr; grid-auto-rows: auto; gap: 6px; }
  .tile { grid-column: span 1; }
  .photos figure { aspect-ratio: 4 / 3; }
  .ph-head { padding: 24px 20px; }
  .photos .ph-head, .photos figure:nth-of-type(1), .photos .m-last { grid-column: span 2; grid-row: span 1; }
  .photos .last2, .photos .last3 { grid-column: span 1; }
  .photos .last2.m-last, .photos .last3.m-last { grid-column: span 2; }
  .notes { grid-template-columns: 1fr; margin-top: 32px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .acc details { transition: none; }
}
