/* Sharon Dagan — portfolio
   Structure and motion follow the reference portfolio; colours are neutral placeholders for now. */

:root {
  /* palette: #591370 main text and buttons, #A168B4 secondary (the soft light), #EFEFEF ground */
  --ground: #efefef;
  --ink: #591370;
  --text: #591370;
  --muted: #7b478a;          /* #591370 softened toward the ground, for secondary text; kept above a 4.5:1 contrast on #EFEFEF */
  --accent: #591370;
  --accent-strong: #430e55;
  --btn-hover: #73308a;       /* the round action buttons on hover: still strong against #EFEFEF, and the arrow stays #EFEFEF */
  --frame: #ffffff;
  --line: #d8cedc;
  --btn-ink: #efefef;
  --rose: 161, 104, 180;     /* #A168B4, the soft light, as r,g,b */
  --sky: 200, 172, 210;      /* #A168B4 lightened */

  --font: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --display: "sol-pro", "Plus Jakarta Sans", system-ui, sans-serif;   /* Sol Pro Bold from Adobe Fonts; Jakarta Bold until the kit loads */

  --bar-h: 4.5rem;
  --margin: clamp(1.25rem, 4vw, 3rem);
  --max: 76rem;
  --section-y: clamp(4.5rem, 5vh + 4vw, 9rem);
  --stack: clamp(0.6rem, 1.6vh, 1.25rem);

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --t-press: 160ms;

  --fs-display-xl: min(clamp(3.5rem, 1.4rem + 7vw, 8rem), 11.5vh);
  --fs-display-l: clamp(2.75rem, 1.5rem + 4.4vw, 5.5rem);
  --fs-display-m: clamp(1.75rem, 1.3rem + 1.6vw, 2.6rem);
  --fs-h3: clamp(1.05rem, 0.98rem + 0.35vw, 1.25rem);
  --fs-lead: clamp(1.1rem, 1rem + 0.45vw, 1.35rem);
  --fs-body: clamp(1rem, 0.97rem + 0.15vw, 1.0625rem);
  --fs-meta: 0.9rem;
  --fs-label: clamp(0.8rem, 0.74rem + 0.3vw, 1rem);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: calc(var(--bar-h) + 1rem); overflow-x: clip; }
body { margin: 0; background: var(--ground); color: var(--text); font-family: var(--font); font-size: var(--fs-body); line-height: 1.6; -webkit-font-smoothing: antialiased; text-align: center; }
img, svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 6px; }
::selection { background: var(--ink); color: var(--ground); }

.wrap { width: 100%; max-width: calc(var(--max) + var(--margin) * 2); margin-inline: auto; padding-inline: var(--margin); position: relative; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.w { display: inline-block; white-space: nowrap; }
.c { display: inline-block; }

p, .card-desc, .card-title, .group-desc, figcaption { text-wrap: pretty; }
.section-title, .contact-title, .case-title, .hero-lead, .contact-lead { text-wrap: balance; }

/* ---------- soft light ---------- */
.blob { position: absolute; z-index: -1; width: min(62vw, 54rem); aspect-ratio: 1; border-radius: 50%; pointer-events: none; will-change: transform; }
.blob-rose { background: radial-gradient(circle at 50% 50%, rgba(var(--rose), 0.5) 0%, rgba(var(--rose), 0.28) 25%, rgba(var(--rose), 0.1) 48%, rgba(var(--rose), 0) 70%); }
.blob-sky { background: radial-gradient(circle at 50% 50%, rgba(var(--sky), 0.58) 0%, rgba(var(--sky), 0.3) 25%, rgba(var(--sky), 0.1) 48%, rgba(var(--sky), 0) 70%); }
.hero .blob-rose { inset-inline-end: 4%; top: -8%; }
.hero .blob-sky { inset-inline-end: -16%; top: 18%; }
.blob-mid { inset-inline-start: -28%; top: 30%; opacity: 0.55; }
.blob-low { inset-inline-end: -22%; top: 10%; opacity: 0.8; }
.blob-end { inset-inline-start: -18%; bottom: -30%; }
.blob-end2 { inset-inline-start: 6%; bottom: -46%; }
section { position: relative; isolation: isolate; overflow-x: clip; }   /* the soft blobs may not widen the page (that let it slide sideways while scrolling) */
body { overflow-x: clip; }

.glow { position: fixed; inset: 0; z-index: 0; pointer-events: none; opacity: 0; transition: opacity 800ms ease; }
.glow.is-on { opacity: 1; }
.glow span { position: absolute; top: 0; left: 0; width: clamp(22rem, 34vw, 34rem); aspect-ratio: 1; margin: calc(clamp(22rem, 34vw, 34rem) / -2) 0 0 calc(clamp(22rem, 34vw, 34rem) / -2); border-radius: 50%; will-change: transform; }
.glow-rose { background: radial-gradient(circle, rgba(var(--rose), 0.42) 0%, rgba(var(--rose), 0.18) 30%, rgba(var(--rose), 0) 68%); }
.glow-sky { background: radial-gradient(circle, rgba(var(--sky), 0.48) 0%, rgba(var(--sky), 0.2) 30%, rgba(var(--sky), 0) 68%); }
main { position: relative; z-index: 1; }

/* ---------- progress, cursor ---------- */
.progress { position: fixed; inset: 0 0 auto 0; height: 3px; z-index: 40; background: var(--accent); transform: scaleX(0); transform-origin: left center; pointer-events: none; }
.cursor { position: fixed; top: 0; left: 0; z-index: 50; width: 0; height: 0; pointer-events: none; opacity: 0; transition: opacity 300ms ease; }
.cursor.is-on { opacity: 1; }
.cursor::before { content: ""; position: absolute; width: 16px; height: 16px; margin: -8px 0 0 -8px; background: var(--accent); -webkit-mask: var(--star-mask) center / contain no-repeat; mask: var(--star-mask) center / contain no-repeat; transition: transform 450ms var(--ease-out), background-color 300ms ease; }   /* the site's hexagon */
@media (prefers-reduced-motion: no-preference) { .cursor::before { animation: cursor-spin 5s linear infinite; } }
@keyframes cursor-spin { to { transform: rotate(360deg); } }
html.has-cursor, html.has-cursor a, html.has-cursor button { cursor: none; }
html.has-cursor .case, html.has-cursor .case a, html.has-cursor .case button { cursor: auto; }
html.has-cursor .case a, html.has-cursor .case button { cursor: pointer; }
body.case-open .cursor { opacity: 0; }

/* ---------- header ---------- */
.bar { position: sticky; top: 0; z-index: 10; height: var(--bar-h); display: flex; align-items: center; gap: clamp(1rem, 3vw, 2.5rem); padding-inline: var(--margin); transition: background-color 300ms ease; }
.bar.is-scrolled { background: var(--ground); }
.wordmark { font-family: var(--display); font-weight: 700; font-size: 1.15rem; letter-spacing: -0.01em; text-decoration: none; margin-inline-end: auto; color: var(--ink); }
.bar-links { display: flex; gap: clamp(1rem, 2.6vw, 2.25rem); font-size: 0.95rem; font-weight: 500; }
.nav-cv { font-weight: 600; }
.skip { position: absolute; inset-inline-start: var(--margin); top: -4rem; z-index: 20; padding: 0.7rem 1rem; background: var(--ink); color: var(--ground); border-radius: 999px; }
.skip:focus { top: 0.5rem; }

/* ---------- buttons & links ---------- */
.actions { display: flex; flex-wrap: wrap; gap: 0.9rem; justify-content: center; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 3.25rem; padding: 0 1.8rem; border-radius: 999px; background: var(--accent); color: var(--btn-ink); border: 1.5px solid var(--accent); font-weight: 600; font-size: 1rem; text-decoration: none; transition: background-color 250ms ease, color 250ms ease, border-color 250ms ease, transform var(--t-press) var(--ease-out); }
.button:active { transform: scale(0.97); }
.button-ghost { background: transparent; color: var(--accent); }
.link { text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 0.22em; text-decoration-thickness: 1px; transition: text-decoration-color 250ms ease; }
@media (hover: hover) and (pointer: fine) {
  .button:hover { background: var(--accent-strong); border-color: var(--accent-strong); transform: scale(1.04); }
  .button-ghost:hover { background: var(--accent); color: var(--btn-ink); }
  .link:hover { text-decoration-color: currentColor; }
}

/* ---------- type ---------- */
.section-title { font-family: var(--display); font-weight: 700; font-size: var(--fs-display-m); line-height: 1.1; letter-spacing: -0.02em; color: var(--ink); }
.group-desc { color: var(--muted); max-width: 52ch; margin-inline: auto; }

/* ---------- hero: one screen, everything on the centre line ---------- */
.hero { min-height: 100svh; display: flex; flex-direction: column; justify-content: center; margin-top: calc(var(--bar-h) * -1); padding-top: calc(var(--bar-h) + 2vh); padding-bottom: 4vh; }
.hero-grid { display: grid; justify-items: center; gap: var(--stack); }
.hero-text { display: flex; flex-direction: column; align-items: center; }
.portrait { position: relative; grid-row: 1; height: clamp(12rem, 40vh, 26rem); aspect-ratio: 1635 / 1417; margin: 0 auto; }
.portrait img { height: 100%; width: auto; margin-inline: auto; object-fit: contain; }
.spark { position: absolute; fill: var(--ink); pointer-events: none; }
.spark-a { width: 11%; aspect-ratio: 1; inset-inline-start: -14%; top: 6%; }
.spark-b { width: 8%; aspect-ratio: 1; inset-inline-end: 6%; top: 10%; fill: #a168b4; }
.spark-c { width: 4.5%; aspect-ratio: 1; inset-inline-end: 2%; top: 22%; fill: #a168b4; }
.spark-d { width: 13%; aspect-ratio: 1; inset-inline-end: -10%; bottom: 22%; }
.name { font-family: var(--display); font-weight: 700; color: var(--ink); line-height: 0.95; letter-spacing: -0.02em; font-size: var(--fs-display-xl); }
.name .w { padding-bottom: 0.06em; }
/* first and last name at one size, side by side; they wrap to two equal lines on narrow screens */
.lines .line { display: inline-block; overflow: hidden; padding-bottom: 0.12em; margin-bottom: -0.12em; }
.lines [data-line] { display: block; }
.name-first, .name-last { font-size: 1em; }
.role { margin-top: calc(var(--stack) * 1.2); font-size: var(--fs-label); font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink); white-space: nowrap; }
.hero-lead { margin-top: var(--stack); max-width: 36ch; margin-inline: auto; font-size: var(--fs-lead); line-height: 1.55; color: var(--text); }
.hero .actions { margin-top: calc(var(--stack) * 1.6); }

/* ---------- marquee ---------- */
.marquee { overflow: hidden; padding-block: clamp(1.1rem, 2vw, 1.6rem); border-block: 1.5px solid var(--line); background: rgba(255, 255, 255, 0.35); }
.marquee-track { display: flex; align-items: center; gap: clamp(1.25rem, 2.5vw, 2.25rem); width: max-content; padding-inline-start: 2rem; }
.marquee-track li { font-family: var(--display); font-weight: 700; font-size: clamp(1.35rem, 1rem + 1.5vw, 2.3rem); line-height: 1.1; color: var(--ink); white-space: nowrap; letter-spacing: -0.01em; }
.mq-star { width: clamp(1rem, 1.6vw, 1.5rem); height: clamp(1rem, 1.6vw, 1.5rem); fill: var(--accent); flex: none; }

/* ---------- projects: a row that slides sideways ---------- */
.projects { padding-block: var(--section-y); }
.hs { position: relative; min-height: 100svh; display: flex; flex-direction: column; justify-content: center; padding-top: calc(var(--bar-h) * 0.8); padding-bottom: 0; }
.hs-head { display: grid; justify-items: center; gap: 0.5rem; margin-bottom: clamp(1rem, 3vh, 2.25rem); }
.hs-viewport { overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding-block: 0.5rem 1.25rem; }
.hs-viewport::-webkit-scrollbar { display: none; }
.hs-track { display: flex; gap: clamp(2.5rem, 5.5vw, 6rem); width: max-content; padding-inline: var(--margin); }
.hs-item { flex: none; width: clamp(18rem, min(34vw, (100svh - 20rem) * 1.3), 34rem); scroll-snap-align: start; }
.hs-foot { margin-top: 0.25rem; }
.hs-bar { display: block; height: 2px; background: var(--accent); transform: scaleX(0); transform-origin: left center; }
html:not(.gsap) .hs-foot { display: none; }
html.gsap .hs-viewport { overflow: visible; scroll-snap-type: none; }

.card { display: flex; flex-direction: column; height: 100%; text-decoration: none; color: inherit; border-radius: 22px; }
.card-media { display: block; aspect-ratio: 4 / 3; overflow: hidden; border-radius: 22px; background: var(--frame); box-shadow: 0 30px 50px -40px rgba(0, 0, 0, 0.45); transition: transform var(--t-press) var(--ease-out); }
.card-media img, .card-media video { width: 100%; height: 100%; object-fit: cover; transition: transform 900ms var(--ease-out); }
.card-body { display: flex; flex-direction: column; align-items: center; gap: 0.45rem; padding: 1.05rem 0.15rem 0; flex: 1; }
.card-title { font-weight: 700; color: var(--ink); font-size: var(--fs-h3); line-height: 1.3; }
.card-desc { color: var(--text); max-width: 52ch; font-size: 0.95rem; line-height: 1.55; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card-foot { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 0.5rem 1.25rem; margin-top: auto; padding-top: 0.5rem; }
.tag { color: var(--muted); font-weight: 500; font-size: var(--fs-meta); }
.card-cta { text-decoration: none; display: inline-flex; align-items: center; gap: 0.45rem; font-weight: 600; color: var(--ink); font-size: var(--fs-meta); }
.arrow { width: 1.1em; height: 1.1em; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; transition: transform 300ms var(--ease-out); }
@media (hover: hover) and (pointer: fine) {
  .card-cta:hover .arrow { transform: translateX(4px); }
}
html.gsap .card-media { will-change: clip-path; }

/* the process: one wide card, opens out of a round window */
.group-process { margin-top: clamp(1.25rem, 4vh, 3rem); }
.group-head { position: relative; display: grid; justify-items: center; gap: 0.35rem; padding-bottom: 1.25rem; margin-bottom: clamp(1.5rem, 3.5vh, 2.5rem); border-bottom: 1.5px solid transparent; }
html.gsap .group-head { border-bottom-color: var(--line); }
.rule { position: absolute; inset-inline: 0; bottom: -1.5px; height: 1.5px; background: var(--ink); transform-origin: left center; }
.group-process .cards { max-width: 60rem; margin-inline: auto; }
.card-wide { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(1.5rem, 3vw, 3rem); align-items: center; }
.card-wide .card-body { padding: 0; }
.card-wide .card-desc { -webkit-line-clamp: unset; display: block; }
.steps { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.4rem; margin-top: 0.4rem; }
.steps li { padding: 0.35rem 0.8rem; border-radius: 999px; background: var(--frame); font-size: var(--fs-meta); font-weight: 500; color: var(--ink); }

/* ---------- about: a full-screen reading moment ---------- */
.about { padding-block: var(--section-y); }

/* the purple field that fades in from About and stays through "Let's talk":
   one fixed layer, so the two sections share it with no seam */
.night {
  position: fixed; inset: 0; z-index: 0; pointer-events: none; opacity: 0;
  background:
    radial-gradient(110% 90% at 85% 85%, rgba(161, 104, 180, 0.85) 0%, rgba(161, 104, 180, 0) 62%),
    radial-gradient(80% 70% at 10% 10%, rgba(161, 104, 180, 0.35) 0%, rgba(161, 104, 180, 0) 60%),
    #591370;
}
.about-grid { display: grid; justify-items: center; gap: 0.5rem; max-width: calc(48rem + var(--margin) * 2); }
.about-me p { margin-inline: auto; max-width: 58ch; font-size: var(--fs-lead); line-height: 1.5; color: var(--ink); font-weight: 300; }   /* light, so the bold words carry the line */
.about-me .actions { margin-top: clamp(1.5rem, 3.5vh, 2.25rem); }
@media (min-width: 48.01em) {
  .about { min-height: 100svh; display: flex; align-items: center; }
  .about-grid { width: 100%; }
  .about-me p { font-size: clamp(1.35rem, 0.95rem + 1.45vw, 2.15rem); line-height: 1.45; max-width: 36ch; }
}

/* ---------- contact ---------- */
.contact { min-height: 100svh; display: flex; flex-direction: column; justify-content: center; padding-block: var(--section-y) clamp(2.5rem, 5vh, 4rem); overflow: hidden; }
.contact-inner { display: flex; flex-direction: column; align-items: center; max-width: calc(60rem + var(--margin) * 2); }
.contact-title { font-family: var(--display); font-weight: 700; color: var(--ink); font-size: var(--fs-display-l); line-height: 1; letter-spacing: -0.035em; }
.contact-lead { margin-top: clamp(0.9rem, 2.2vh, 1.4rem); max-width: 40ch; font-size: var(--fs-lead); line-height: 1.55; color: var(--text); }
.contact .actions { margin-top: clamp(1.5rem, 3.5vh, 2.25rem); }
.contact .actions .button { min-width: 13.5rem; }
.contact-links { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.5px; width: 100%; margin-top: clamp(2.5rem, 6vh, 4rem); background: var(--line); border: 1.5px solid var(--line); border-radius: 18px; overflow: hidden; }
.contact-links li { display: grid; gap: 0.3rem; justify-items: center; align-content: center; padding: clamp(1rem, 2.4vh, 1.4rem) 0.75rem; background: var(--ground); }
.contact-links span { color: var(--muted); font-size: var(--fs-meta); font-weight: 500; }
.contact-links a { color: var(--ink); font-weight: 500; font-size: 0.95rem; overflow-wrap: anywhere; }
.foot { display: flex; justify-content: space-between; align-items: center; gap: 1rem; width: 100%; margin-top: clamp(2.5rem, 7vh, 4.5rem); padding-top: 1.1rem; border-top: 1.5px solid var(--line); color: var(--muted); font-size: var(--fs-meta); }
.foot-star { width: 1rem; height: 1rem; fill: var(--accent); flex: none; }

/* ---------- case viewer ---------- */
.case { position: fixed; inset: 0; width: 100%; max-width: none; height: 100%; max-height: none; margin: 0; padding: 0; border: 0; background: var(--ground); color: var(--text); overflow: hidden; }
.case::backdrop { background: rgba(0, 0, 0, 0.55); }
.case[open] { display: flex; flex-direction: column; }
.case-bar { flex: none; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 1rem; height: var(--bar-h); padding-inline: var(--margin); border-bottom: 1.5px solid var(--line); }
.case-bar-title { font-weight: 600; color: var(--ink); font-size: 0.95rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.case-close, .case-next { display: inline-flex; align-items: center; gap: 0.45rem; min-height: 2.75rem; padding-inline: 1rem; border-radius: 999px; font-weight: 600; font-size: 0.95rem; color: var(--ink); transition: background-color 250ms ease, color 250ms ease, transform var(--t-press) var(--ease-out); }
.case-close { justify-self: start; border: 1.5px solid var(--ink); }
.case-next { justify-self: end; }
.case-close svg, .case-next svg { width: 1.05rem; height: 1.05rem; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.case-close:active, .case-next:active { transform: scale(0.96); }
@media (hover: hover) and (pointer: fine) { .case-close:hover { background: var(--ink); color: var(--ground); } .case-next:hover { background: rgba(0, 0, 0, 0.06); } }
.case-scroll { flex: 1; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.case-head { padding-top: clamp(2.5rem, 6vw, 5rem); padding-bottom: clamp(2rem, 4vw, 3rem); max-width: calc(64rem + var(--margin) * 2); }
.case-head .tag { font-size: var(--fs-meta); }
.case-title { margin-top: 0.75rem; font-family: var(--display); font-weight: 700; color: var(--ink); font-size: var(--fs-display-l); line-height: 1; letter-spacing: -0.035em; }
.case-sub { margin-top: 0.6rem; font-weight: 600; color: var(--ink); font-size: var(--fs-lead); }
.case-desc { margin: 1.1rem auto 0; max-width: 62ch; font-size: var(--fs-lead); line-height: 1.55; }
.case-meta { margin-top: 2rem; display: grid; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); gap: 1.25rem 2rem; padding-top: 1.5rem; border-top: 1.5px solid var(--line); }
.case-meta dt { color: var(--muted); font-weight: 600; font-size: 0.88rem; }
.case-meta dd { color: var(--ink); font-weight: 500; margin-top: 0.2rem; }
.case-story { max-width: calc(76rem + var(--margin) * 2); display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(1rem, 2vw, 1.75rem); padding-bottom: clamp(2.5rem, 5vw, 4rem); }
.case-story article { background: var(--frame); border-radius: 20px; padding: clamp(1.4rem, 2.6vw, 2.25rem); }
.case-story h3 { font-size: var(--fs-h3); font-weight: 700; color: var(--ink); margin-bottom: 0.6rem; }
.case-story p { color: var(--ink); line-height: 1.65; }
.case-process { max-width: calc(76rem + var(--margin) * 2); padding-bottom: clamp(2.5rem, 5vw, 4rem); }
.case-process h3, .case-work-title { font-weight: 700; color: var(--ink); font-size: var(--fs-h3); margin-bottom: 1rem; }
.case-work-title { max-width: calc(76rem + var(--margin) * 2); }
.case-process ol { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.6rem; }
.case-process li { display: inline-flex; align-items: center; gap: 0.55rem; padding: 0.55rem 1.05rem; border-radius: 999px; background: var(--frame); color: var(--ink); font-size: var(--fs-meta); font-weight: 500; }
.case-process li::before { content: ""; width: 0.8rem; height: 0.8rem; background: var(--accent); -webkit-mask: var(--star-mask) center / contain no-repeat; mask: var(--star-mask) center / contain no-repeat; }
.case-body { width: 100%; max-width: none; margin-inline: auto; padding-inline: var(--margin); display: grid; gap: clamp(1.5rem, 3vw, 2.5rem); }
/* the prototype takes the whole width and the full height under the window's bar */
.case-embed { display: block; width: calc(100% + 2 * var(--margin)); margin-inline: calc(-1 * var(--margin)); height: calc(100svh - var(--bar-h)); border: 0; border-block: 1px solid rgba(0, 0, 0, 0.1); background: var(--frame); }
.case-film { display: block; width: min(100%, 44rem, calc(100svh - var(--bar-h) - 4rem)); aspect-ratio: 1; margin-inline: auto; border-radius: 20px; background: #000; object-fit: contain; }
.case-end { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.9rem; padding-block: clamp(3rem, 6vw, 5rem); }
body.case-open { overflow: hidden; }
:root { --star-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7.6 2H16.4Q18 2 18.82 3.37L23.18 10.63Q24 12 23.18 13.37L18.82 20.63Q18 22 16.4 22H7.6Q6 22 5.18 20.63L0.82 13.37Q0 12 0.82 10.63L5.18 3.37Q6 2 7.6 2Z'/%3E%3C/svg%3E"); }

/* ---------- smooth scrolling (Lenis) ---------- */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-stopped { overflow: hidden; }

/* ---------- CSS fallbacks before / without GSAP ---------- */
@media (prefers-reduced-motion: no-preference) {
  .js [data-rise] { opacity: 0; transform: translateY(16px); animation: rise 900ms var(--ease-out) forwards; animation-delay: calc(var(--i, 0) * 110ms + 150ms); }
  .js .lines [data-line] { transform: translateY(105%); animation: line 1100ms var(--ease-out) forwards; animation-delay: calc(var(--i, 0) * 120ms + 100ms); }
  .js [data-reveal] { opacity: 0; transform: translateY(22px); transition: opacity 800ms var(--ease-out), transform 1000ms var(--ease-out); }
  .js [data-reveal].is-in { opacity: 1; transform: none; }
  .blob { animation: drift 18s var(--ease-in-out) infinite alternate; }
  .blob-sky { animation-duration: 22s; }
  .spark-b, .spark-c { animation: twinkle 5s var(--ease-in-out) infinite alternate; }
  .spark-c { animation-delay: 1.6s; }
}
html.gsap .blob, html.gsap .spark-b, html.gsap .spark-c { animation: none; }
@keyframes rise { to { opacity: 1; transform: none; } }
@keyframes line { to { transform: none; } }
@keyframes twinkle { from { opacity: 1; transform: scale(1); } to { opacity: 0.55; transform: scale(0.8) rotate(12deg); } }
@keyframes drift { from { transform: translate3d(0, 0, 0); } to { transform: translate3d(3%, 4%, 0); } }

/* ---------- phones ---------- */
@media (max-width: 48em) {
  .hero { min-height: auto; padding-top: calc(var(--bar-h) + 1.5rem); padding-bottom: 3rem; }
  .portrait { height: min(20rem, 62vw); }
  .name { font-size: clamp(3.2rem, 15vw, 4.5rem); }
  .hero .blob-rose { inset-inline-end: -30%; top: -4%; width: 110vw; }
  .hero .blob-sky { inset-inline-end: -50%; top: 6%; width: 110vw; }
  .hs { min-height: auto; padding-top: 0; }
  .hs-item { width: auto; }
  html.gsap .hs-track { flex-direction: column; width: auto; gap: 3.5rem; }
  .hs-foot { display: none; }
  .card-wide { grid-template-columns: 1fr; gap: 0; }
  .card-wide .card-body { padding-top: 1.35rem; }
  .contact { min-height: auto; }
  .contact-links { grid-template-columns: 1fr; }
  .case-story { grid-template-columns: 1fr; }
  .case-bar { grid-template-columns: auto 1fr; }
  .case-bar-title { display: none; }
}
@media (max-width: 36em) {
  :root { --bar-h: 3.75rem; }
  .bar-links { display: none; }
  .actions .button { flex: 1 1 auto; }
  .contact .actions .button { min-width: 0; width: 100%; }
  .foot { flex-direction: column; gap: 0.5rem; }
}
@media (min-width: 48.01em) and (max-height: 640px) {
  .portrait { height: 30vh; }
  .hero-lead { font-size: 1rem; }
}
.case-story[hidden], .case-process[hidden], .case-work-title[hidden] { display: none; }

/* ---------- selected projects as a 3D ring (main.js adds .is-ring; without it the plain row stays) ---------- */
.ring-info { display: none; }
.hs.is-ring { height: 100svh; min-height: 0; display: flex; flex-direction: column; justify-content: flex-start; padding-top: calc(var(--bar-h) + clamp(0.5rem, 2vh, 1.5rem)); padding-bottom: clamp(1rem, 3vh, 2rem); overflow: hidden; }
.hs.is-ring .hs-head { margin-bottom: 0; position: relative; z-index: 2; }
.hs.is-ring .hs-head .group-desc { color: var(--ink); font-weight: 500; }   /* stands clear of the blurred light behind the ring */
.hs.is-ring .ring-info { position: relative; z-index: 2; }
.hs.is-ring .hs-foot { display: none; }
.hs.is-ring .hs-viewport { position: relative; flex: 1 1 auto; min-height: 0; overflow: visible; padding: 0; perspective: 1500px; perspective-origin: 50% 40%; }
.ring-tint { position: absolute; left: 50%; top: 50%; width: min(70vw, 60rem); aspect-ratio: 1.6; translate: -50% -50%; border-radius: 50%; background-color: #d8c6dd; filter: blur(60px); opacity: 0.75; pointer-events: none; }
.hs.is-ring .hs-track { position: absolute; left: 50%; top: 42%; width: 0; height: 0; padding: 0; gap: 0; display: block; transform-style: preserve-3d; }
.hs.is-ring .hs-item { position: absolute; width: var(--ring-w); height: calc(var(--ring-w) * 0.75); left: calc(var(--ring-w) / -2); top: calc(var(--ring-w) * -0.375); backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.hs.is-ring .card { height: 100%; position: relative; }
.hs.is-ring .card-media { height: 100%; aspect-ratio: auto; border-radius: 22px; box-shadow: 0 30px 60px -30px rgba(42, 30, 45, 0.45); }
.hs.is-ring .card-media img { width: 100%; height: 100%; transition: none; }
.hs.is-ring .card-body { display: none; }
.hs.is-ring .hs-item::after { content: ""; position: absolute; inset: 0; border-radius: 22px; background: var(--ground); opacity: var(--veil, 0); pointer-events: none; }
.hs.is-ring .ring-info { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 0.3rem; padding-inline: var(--margin); }
.ring-num { font-size: 0.75rem; letter-spacing: 0.22em; color: var(--muted); }
.ring-title { font-family: var(--display); font-weight: 700; color: var(--ink); font-size: clamp(1.5rem, 1.1rem + 1.8vw, 2.6rem); line-height: 1.15; letter-spacing: 0.02em; max-width: 30ch; }
.ring-kind { color: var(--accent); font-weight: 500; font-size: 0.95rem; }
.ring-cta { margin-top: 0.6rem; min-height: 2.9rem; }
.ring-dots { display: flex; gap: 0.5rem; margin-top: 0.8rem; }
.ring-dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--ink); opacity: 0.2; transition: opacity 300ms ease, transform 300ms var(--ease-out); }
.ring-dots i.on { opacity: 0.85; transform: scale(1.35); }
@media (max-height: 36rem), (max-width: 48em) { .hs.is-ring .hs-head .group-desc { display: none; } }
/* the orbs that drift around the ring (positions here; main.js moves, scales and recolours them) */
.ring-orb { position: absolute; aspect-ratio: 1; border-radius: 50%; pointer-events: none; filter: blur(70px); will-change: transform; }
.ring-orb-a { width: min(34vw, 28rem); left: 6%; top: 14%; background: #a168b4; opacity: 0.38; }
.ring-orb-b { width: min(26vw, 22rem); right: 6%; top: 36%; background: #591370; opacity: 0.2; }
.ring-orb-c { width: min(22vw, 18rem); left: 40%; bottom: -8%; background: #c09ecc; opacity: 0.45; }
@media (max-width: 48em) { .ring-orb { filter: blur(50px); } .ring-orb-a { width: 60vw; } .ring-orb-b { width: 48vw; } .ring-orb-c { width: 42vw; } }
.w.is-bold { font-weight: 700; }

/* contact buttons: icon + label, a round copy button beside "Email me" */
.contact-actions { align-items: center; }
.contact .actions .button { min-width: 0; }
.contact .actions .copy-btn { gap: 0.6rem; padding-inline: 1.6rem; }
.btn-icon { width: 1.2em; height: 1.2em; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.copy-btn { width: 3.25rem !important; min-width: 3.25rem !important; flex: none !important; padding: 0 !important; }
.copy-btn .icon-done { display: none; }
.copy-btn.is-copied .icon-copy { display: none; }
.copy-btn.is-copied .icon-done { display: block; }
.copy-note { min-height: 1.5em; margin-top: 0.8rem; font-size: var(--fs-meta); color: var(--muted); }
@media (max-width: 36em) { .contact .actions .button:not(.copy-btn) { flex: 1 1 auto; } }

/* Sharon's hexagon pattern, once, on the right between Selected Projects and Motion Design */
.motion-area { position: relative; }
.hex-deco {
  position: absolute; z-index: -1; pointer-events: none;
  width: min(62vw, 980px); aspect-ratio: 1635 / 1306;
  background: url("../assets/img/hex-pattern.png") 0 0 / 100% 100% no-repeat;   /* whole pattern until main.js splits it */
  right: calc(-1 * var(--margin) - 14vw); top: calc(-1 * clamp(18rem, 42vh, 30rem));   /* starts higher, so it arrives sooner on the way down */
  opacity: 0.14;
}
@media (max-width: 48em) { .hex-deco { width: 90vw; right: -40vw; top: -12rem; opacity: 0.1; } }
/* the pattern split into its 33 hexagons, each a window onto the same image */
.hex-deco.is-split { background: none; }
.hex-piece {
  position: absolute; width: 13.7%; height: 15.3%;          /* a 224 x 200 box out of 1635 x 1306 */
  background: url("../assets/img/hex-pattern.png") no-repeat; background-size: 729.9% auto;
  clip-path: polygon(25% 0, 75% 0, 100% 50%, 75% 100%, 25% 100%, 0 50%);
  will-change: transform, opacity;
}
.role span { white-space: nowrap; }
/* one line at every width: the type steps down as the screen narrows */
.role { font-size: clamp(0.6875rem, 2.1vw, var(--fs-label)); letter-spacing: 0.1em; }
@media (max-width: 40em) { .role { font-size: calc((100vw - 2 * var(--margin)) / 35.5); letter-spacing: 0.06em; } }   /* phones: sized so the whole line always fits, edge to edge */

/* =====================================================================
   Card and button system, after the reference UI: big rounded cards, a picture set inside the card's frame,
   and action buttons built as a pill with a round arrow chip at its end.
   Only shapes and structure here; colours come from the existing palette, fonts and motion are untouched.
   ===================================================================== */
:root {
  /* the arrow, drawn solid in the palette white #EFEFEF (not cut out of its circle, so nothing shows through it) */
  --arrow-white: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23efefef' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14M13 6l6 6-6 6'/%3E%3C/svg%3E");
  --arrow-dark: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23591370' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14M13 6l6 6-6 6'/%3E%3C/svg%3E");  --card-radius: 28px;
  --card-inner-radius: 20px;
}

/* ---- action buttons, built as two parts: the label, whose end is cut in a curve that wraps the round arrow button,
   and the round button itself, set apart with an even gap. Buttons that already carry an icon keep it. ---- */
.button:not(.copy-btn) {
  --bd: 42px;                              /* the round button */
  --bgap: 7px;                             /* the gap between the label's curve and the round button */
  --r: calc(var(--bd) / 2 + var(--bgap));  /* radius of the curve cut into the label */
  --dx: 20.78px;                           /* where the rounded tip starts, measured from the label's end */
  --k: 3px;                                /* how much the two tips of the label are rounded */
  --tip-base: radial-gradient(circle at 100% 50%, transparent var(--r), #000 calc(var(--r) + 0.5px));
  --tip-cut-t: linear-gradient(#000, #000) right 0 top -2px / var(--dx) 7.2px no-repeat;
  --tip-cut-b: linear-gradient(#000, #000) right 0 bottom -2px / var(--dx) 7.2px no-repeat;
  --tip-disc-t: radial-gradient(circle var(--k) at calc(100% - var(--dx)) var(--k), #000 calc(var(--k) - 0.5px), transparent var(--k));
  --tip-disc-b: radial-gradient(circle var(--k) at calc(100% - var(--dx)) calc(100% - var(--k)), #000 calc(var(--k) - 0.5px), transparent var(--k));
  position: relative; isolation: isolate; gap: calc(1.75rem + var(--bgap)); padding: 0 0 0 1.75rem; white-space: nowrap;
  background: transparent; border: 0;
}
.button:not(.copy-btn)::before {
  content: ""; position: absolute; z-index: -1; left: 0; top: 0; height: 100%; width: calc(100% - var(--bd) / 2);
  border-radius: 999px 0 0 999px; background: var(--accent);
  -webkit-mask: var(--tip-disc-t), var(--tip-disc-b), var(--tip-base), var(--tip-cut-t), var(--tip-cut-b);
  -webkit-mask-composite: source-over, source-over, source-out, source-over, source-over;
  mask: var(--tip-disc-t), var(--tip-disc-b), var(--tip-base), var(--tip-cut-t), var(--tip-cut-b);
  mask-composite: add, add, subtract, add, add;
  transition: background-color 250ms ease;
}
.button-ghost:not(.copy-btn)::before { background: color-mix(in srgb, currentColor 14%, transparent); }
.button:not(.copy-btn)::after {
  content: ""; flex: none; margin-left: auto; width: var(--bd); height: var(--bd); border-radius: 50%;   /* the space right of the text equals the space left of it */
  background: #a168b4 var(--arrow-white) center / 1.15rem no-repeat;   /* the palette's secondary purple, with the solid white arrow */
  transition: transform 350ms var(--ease-out), background-color 250ms ease;
}
@media (hover: hover) and (pointer: fine) {
  .button:not(.copy-btn):hover { background: transparent; border-color: transparent; transform: none; }
  .button-ghost:not(.copy-btn):hover { color: var(--accent); }
  .button:not(.copy-btn):hover::after { transform: scale(1.12); background-color: var(--btn-hover); }
  .about-me .button:not(.copy-btn):hover::after, .contact .button:not(.copy-btn):hover::after { background-color: #d9c6e0; }
}
.hs.is-ring .ring-cta { min-height: 3.25rem; }

/* ---- project pictures: no frame, no background colour. Just the picture with a rounded notch cut out of its
   lower-right corner (a real cut, the page shows through) and a separate round action button sitting in the notch ---- */
.hs.is-ring .card, .group-process .card-wide .card-media { --n: 64px; --f: 16px; --p: 22px; --btn: #591370; }
.hs.is-ring .card { padding: 0; background: none; box-shadow: none; border-radius: var(--card-inner-radius); filter: drop-shadow(0 26px 28px rgba(42, 30, 45, 0.28)); }
.hs.is-ring .card-media { border-radius: var(--card-inner-radius); box-shadow: none; position: relative; }
.hs.is-ring .hs-item::after { border-radius: var(--card-inner-radius); }

/* the notch is one mask: the whole picture, minus a rounded square in the corner, minus two small inverted corners where the notch meets the picture's edges */
.hs.is-ring .media-clip, .hs.is-ring .hs-item::after, .group-process .card-wide .media-clip {
  -webkit-mask-image:
    linear-gradient(#000 0 0),
    linear-gradient(#000 0 0),
    linear-gradient(#000 0 0),
    radial-gradient(circle at 100% 100%, #000 var(--p), transparent calc(var(--p) + 0.5px)),
    radial-gradient(circle at 0 0, transparent var(--f), #000 calc(var(--f) + 0.5px)),
    radial-gradient(circle at 0 0, transparent var(--f), #000 calc(var(--f) + 0.5px));
  mask-image:
    linear-gradient(#000 0 0),
    linear-gradient(#000 0 0),
    linear-gradient(#000 0 0),
    radial-gradient(circle at 100% 100%, #000 var(--p), transparent calc(var(--p) + 0.5px)),
    radial-gradient(circle at 0 0, transparent var(--f), #000 calc(var(--f) + 0.5px)),
    radial-gradient(circle at 0 0, transparent var(--f), #000 calc(var(--f) + 0.5px));
  -webkit-mask-position: 0 0, right 0 bottom 0, right calc(var(--n) - var(--p)) bottom 0, right calc(var(--n) - var(--p)) bottom calc(var(--n) - var(--p)), right var(--n) bottom 0, right 0 bottom var(--n);
  mask-position: 0 0, right 0 bottom 0, right calc(var(--n) - var(--p)) bottom 0, right calc(var(--n) - var(--p)) bottom calc(var(--n) - var(--p)), right var(--n) bottom 0, right 0 bottom var(--n);
  -webkit-mask-size: 100% 100%, calc(var(--n) - var(--p)) var(--n), var(--p) calc(var(--n) - var(--p)), var(--p) var(--p), var(--f) var(--f), var(--f) var(--f);
  mask-size: 100% 100%, calc(var(--n) - var(--p)) var(--n), var(--p) calc(var(--n) - var(--p)), var(--p) var(--p), var(--f) var(--f), var(--f) var(--f);
  -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
  -webkit-mask-composite: source-out, source-over, source-over, source-over, source-over, source-over;
  mask-composite: subtract, add, add, add, add, add;
}
.hs.is-ring .hs-item { --n: 64px; --f: 16px; --p: 22px; }
.hs.is-ring .card-media, .group-process .card-wide .card-media { --n: inherit; }

/* the round action button, set inside the notch with an even gap around it; purple for the strongest contrast with the page */
.card-go { display: none; }
.hs.is-ring .card-go, .group-process .card-wide .card-go {
  display: block; position: absolute; right: calc((var(--n) - 46px) / 2); bottom: calc((var(--n) - 46px) / 2); z-index: 2; width: 46px; height: 46px; border-radius: 50%;
  background: var(--btn) var(--arrow-white) center / 1.2rem no-repeat; transition: transform 350ms var(--ease-out), background-color 250ms ease;
}
@media (hover: hover) and (pointer: fine) { .hs.is-ring .card-go:hover, .group-process .card-wide .card-go:hover { transform: scale(1.14); background-color: var(--btn-hover); } }
.hs.is-ring .card-go:focus-visible, .group-process .card-wide .card-go:focus-visible { transform: scale(1.14); background-color: var(--btn-hover); }

/* ---- the Motion Design card: no panel, just the picture with its notch and the text beside it ---- */
.group-process .card-wide { gap: clamp(1.25rem, 3vw, 3rem); }
.group-process .card-wide .card-media { --n: 58px; --btn: #591370; aspect-ratio: 2000 / 1116; border-radius: var(--card-inner-radius); box-shadow: none; position: relative; }
.group-process .card-wide .card-body { align-items: flex-start; text-align: left; padding: clamp(0.5rem, 2vw, 1.5rem) 0; gap: 0.75rem; }
.group-process .card-wide .card-title { font-size: var(--fs-lead); }
.group-process .card-wide .card-foot { justify-content: flex-start; padding-top: 0.5rem; }
/* the same two-part button: a label whose end curves around the round arrow button */
.group-process .card-wide .card-cta {
  --bd: 38px; --bgap: 6px; --r: calc(var(--bd) / 2 + var(--bgap));
  --dx: 19.6px;
  --k: 3px;                                /* how much the two tips of the label are rounded */
  --tip-base: radial-gradient(circle at 100% 50%, transparent var(--r), #000 calc(var(--r) + 0.5px));
  --tip-cut-t: linear-gradient(#000, #000) right 0 top -2px / var(--dx) 7.2px no-repeat;
  --tip-cut-b: linear-gradient(#000, #000) right 0 bottom -2px / var(--dx) 7.2px no-repeat;
  --tip-disc-t: radial-gradient(circle var(--k) at calc(100% - var(--dx)) var(--k), #000 calc(var(--k) - 0.5px), transparent var(--k));
  --tip-disc-b: radial-gradient(circle var(--k) at calc(100% - var(--dx)) calc(100% - var(--k)), #000 calc(var(--k) - 0.5px), transparent var(--k));
  position: relative; isolation: isolate; height: 46px; gap: calc(1.55rem + var(--bgap)); padding: 0 0 0 1.55rem; white-space: nowrap;
  color: #efefef; font-weight: 600; font-size: 1rem; background: none;
}
.group-process .card-wide .card-cta::before {
  content: ""; position: absolute; z-index: -1; left: 0; top: 0; height: 100%; width: calc(100% - var(--bd) / 2);
  border-radius: 999px 0 0 999px; background: #591370;
  -webkit-mask: var(--tip-disc-t), var(--tip-disc-b), var(--tip-base), var(--tip-cut-t), var(--tip-cut-b);
  -webkit-mask-composite: source-over, source-over, source-out, source-over, source-over;
  mask: var(--tip-disc-t), var(--tip-disc-b), var(--tip-base), var(--tip-cut-t), var(--tip-cut-b);
  mask-composite: add, add, subtract, add, add;
}
.group-process .card-wide .card-cta .arrow { flex: none; box-sizing: border-box; width: var(--bd); height: var(--bd); padding: 0.55rem; border-radius: 50%; background: #a168b4; stroke: #efefef; transition: transform 350ms var(--ease-out), background-color 250ms ease; }
@media (hover: hover) and (pointer: fine) { .group-process .card-wide .card-cta:hover .arrow { transform: scale(1.12); background-color: var(--btn-hover); } }

/* ---- case study window: the challenge / solution as big rounded cards, one light, one dark ---- */
.case-story article { border-radius: var(--card-radius); padding: clamp(1.6rem, 3vw, 2.75rem); display: grid; gap: 1.2rem; align-content: space-between; min-height: 12rem; }
.case-story h3 { font-size: var(--fs-lead); margin: 0; }
.case-story article:nth-child(2) { background: #591370; --ink: #efefef; }
.case-story article:nth-child(2) p { color: #efefef; }
/* the inner layer that carries the notch; the button sits above it, so the cut never removes the button */
.hs.is-ring .card-media, .group-process .card-wide .card-media { background: none; }
.media-clip { display: block; position: absolute; inset: 0; overflow: hidden; border-radius: inherit; }
.media-clip img { width: 100%; height: 100%; object-fit: cover; }

/* the icon + label inside a two-part button (Email me, the phone number) */
.btn-label { display: inline-flex; align-items: center; gap: 0.6rem; }
/* on the purple field the round button is light with a dark arrow, so it stays strong at rest and on hover */
.about-me .button:not(.copy-btn)::after, .contact .button:not(.copy-btn)::after { background: #efefef var(--arrow-dark) center / 1.15rem no-repeat; }

/* "Email me": the copy button is its round button, sitting in the curve where the arrow sits on the other buttons */
.split { position: relative; display: inline-flex; }
.split .button { flex: 1 1 auto; }
.contact .split .button:not(.copy-btn)::after, .contact .split .button:not(.copy-btn):hover::after { background: none; transform: none; }
.contact .split .copy-btn {
  position: absolute; top: 0; right: 0; bottom: 0; margin: auto 0; width: 42px !important; height: 42px; min-width: 42px !important; min-height: 0;
  border: 0; background: #efefef; color: #591370; transition: transform 350ms var(--ease-out), background-color 250ms ease;
}
@media (hover: hover) and (pointer: fine) { .contact .split .copy-btn:hover { background: #d9c6e0; color: #591370; transform: scale(1.12); } }
@media (max-width: 36em) { .contact .actions .split { width: 100%; } }

/* ---- scroll cue: a quiet vertical guide on the left that says "this page scrolls down", whatever the section does while it is pinned ---- */
.scroll-cue { position: fixed; left: clamp(0.9rem, 2.2vw, 2rem); top: 50%; z-index: 30; display: none; flex-direction: column; align-items: center; gap: 0.7rem; color: var(--ink); opacity: 0.8; pointer-events: none; transform: translateY(-50%); transition: opacity 500ms ease; }
.scroll-cue.is-off, body.case-open .scroll-cue { opacity: 0; }
.scroll-cue-label { writing-mode: vertical-rl; font-size: 0.68rem; font-weight: 600; letter-spacing: 0.22em; text-transform: uppercase; }
.scroll-cue-line { position: relative; display: block; width: 1.5px; height: 76px; overflow: hidden; background: color-mix(in srgb, currentColor 22%, transparent); border-radius: 2px; }
.scroll-cue-line i { position: absolute; left: 0; top: 0; width: 100%; height: 26px; border-radius: 2px; background: currentColor; transform: translateY(-110%); animation: cue-drop 2.4s cubic-bezier(0.6, 0, 0.3, 1) infinite; }
.scroll-cue-chev { width: 0.9rem; height: 0.9rem; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; animation: cue-nudge 2.4s ease-in-out infinite; }
@keyframes cue-drop { 0% { transform: translateY(-110%); } 70%, 100% { transform: translateY(300%); } }
@keyframes cue-nudge { 0%, 55% { transform: translateY(0); opacity: 0.5; } 80% { transform: translateY(4px); opacity: 1; } 100% { transform: translateY(0); opacity: 0.5; } }
@media (min-width: 48.01em) and (hover: hover) { .scroll-cue { display: flex; } }
@media (prefers-reduced-motion: reduce) { .scroll-cue-line i, .scroll-cue-chev { animation: none; } .scroll-cue-line i { transform: translateY(40%); } }

/* ---- accessibility: the options button, "stop animations", and the legal pages ---- */
html.calm *, html.calm *::before, html.calm *::after { animation: none !important; scroll-behavior: auto !important; }
html.calm [data-rise], html.calm .lines [data-line], html.calm [data-reveal] { opacity: 1 !important; transform: none !important; }
html.calm .scroll-cue-line i { transform: translateY(40%); }

.a11y { position: fixed; left: clamp(0.9rem, 2vw, 1.5rem); bottom: clamp(0.9rem, 2vw, 1.5rem); z-index: 60; text-align: left; }
.a11y-toggle { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; background: var(--ink); color: var(--ground); box-shadow: 0 6px 18px rgba(42, 30, 45, 0.25); transition: transform 300ms var(--ease-out); }
.a11y-toggle svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.a11y-toggle circle { fill: currentColor; stroke: none; }
@media (hover: hover) and (pointer: fine) { .a11y-toggle:hover { transform: scale(1.1); } }
.a11y-panel { position: absolute; left: 0; bottom: calc(100% + 0.6rem); width: max-content; min-width: 14.5rem; display: grid; gap: 0.15rem; padding: 0.5rem; background: var(--ground); color: var(--ink); border: 1.5px solid var(--ink); border-radius: 18px; box-shadow: 0 14px 34px rgba(42, 30, 45, 0.28); }
.a11y-panel[hidden] { display: none; }
.a11y-panel button, .a11y-panel a { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 2.6rem; padding: 0 0.85rem; border-radius: 12px; font-weight: 600; font-size: 0.95rem; color: var(--ink); text-decoration: none; text-align: left; }
.a11y-panel a { text-decoration: underline; text-underline-offset: 0.2em; }
.a11y-panel button[aria-pressed="true"] { background: var(--ink); color: var(--ground); }
@media (hover: hover) and (pointer: fine) { .a11y-panel button:hover, .a11y-panel a:hover { background: color-mix(in srgb, var(--ink) 14%, transparent); } .a11y-panel button[aria-pressed="true"]:hover { background: var(--ink); } }

.foot a { color: inherit; font-weight: 500; text-decoration: underline; text-underline-offset: 0.2em; }

/* legal pages */
.legal-bar { display: flex; justify-content: space-between; align-items: center; padding: 1.25rem var(--margin); }
.legal-bar .wordmark { margin: 0; }
.legal { max-width: 46rem; margin: 0 auto; padding: clamp(1.5rem, 4vw, 3rem) var(--margin) 6rem; text-align: left; color: var(--text); }
.legal h1 { font-family: var(--display); font-size: var(--fs-display-m, clamp(2rem, 5vw, 3.2rem)); line-height: 1.05; letter-spacing: -0.03em; color: var(--ink); margin-bottom: 0.5rem; }
.legal .updated { color: var(--muted); font-size: var(--fs-meta); margin-bottom: 2rem; }
.legal h2 { font-size: 1.25rem; color: var(--ink); margin: 2.2rem 0 0.6rem; }
.legal p, .legal li { line-height: 1.7; margin-bottom: 0.8rem; max-width: 68ch; }
.legal ul { list-style: disc; padding-left: 1.3rem; }
.legal a { color: var(--ink); font-weight: 600; text-underline-offset: 0.2em; }
.case-note { color: var(--muted); font-size: var(--fs-meta); margin-top: 1rem; }
.case-note a { color: inherit; text-underline-offset: 0.2em; }

/* ---- language button, top left: the same two-part button, smaller, with a globe as its round button ---- */
.bar > .lang-btn { flex: none; }
.lang-btn.button:not(.copy-btn) {
  --bd: 32px; --bgap: 5px; --r: calc(var(--bd) / 2 + var(--bgap)); --dx: 16.94px;
  --globe: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='8.5'/%3E%3Cpath d='M3.5 12h17M12 3.5c2.6 2.4 3.8 5.2 3.8 8.5s-1.2 6.1-3.8 8.5c-2.6-2.4-3.8-5.2-3.8-8.5S9.4 5.9 12 3.5z'/%3E%3C/svg%3E");
  min-height: 2.5rem; padding: 0 0 0 1.15rem; gap: calc(1.15rem + var(--bgap)); font-size: 0.9rem; unicode-bidi: isolate;
}
/* the globe is cut out of the round button, so the page shows through it and it works on the light page and the purple one */
.lang-btn.button:not(.copy-btn)::after, .lang-btn.button:not(.copy-btn):hover::after {
  background: var(--ink);
  -webkit-mask: var(--globe) center / 1.15rem no-repeat, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
  mask: var(--globe) center / 1.15rem no-repeat, linear-gradient(#000 0 0); mask-composite: exclude;
}
@media (hover: hover) and (pointer: fine) {
  .lang-btn.button:not(.copy-btn):hover { color: var(--accent); }
  .lang-btn.button:not(.copy-btn):hover::after { transform: scale(1.12); background: color-mix(in srgb, var(--ink) 78%, var(--ground)); }
}
.bar > .lang-btn { margin-inline-end: clamp(0.6rem, 2vw, 1.25rem); }
.legal-bar { gap: 1rem; }
.legal-bar .wordmark { margin-inline-end: auto; }
.legal-bar .lang-btn { margin-inline-end: 0; }

/* ---- Hebrew: a typeface with Hebrew letters after the site's own, no tight letter-spacing, and the legal pages by language ---- */
html[lang="he"] { --font: "Plus Jakarta Sans", "Noto Sans Hebrew", system-ui, -apple-system, "Segoe UI", sans-serif; --display: "sol-pro", "Noto Sans Hebrew", "Plus Jakarta Sans", system-ui, sans-serif; }
html[lang="he"] body * { letter-spacing: 0 !important; }
html[lang="he"] .role, html[lang="he"] .role * { text-transform: none; }
.lang-he { display: none; }
html[lang="he"] .lang-he { display: block; text-align: right; }
html[lang="he"] .lang-en { display: none; }
html[lang="he"] .lang-he ul { padding-left: 0; padding-right: 1.3rem; }
html[lang="he"] .a11y-panel button, html[lang="he"] .a11y-panel a { text-align: right; }
html[lang="he"] .group-process .card-wide .card-body { align-items: flex-end; text-align: right; }

/* ---- Hebrew: the two-part buttons mirror: the label on the right, the round button on the left, pointing left ---- */
.button[dir="rtl"], .card-cta[dir="rtl"] {
  --arrow-white: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23efefef' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M19 12H5M11 6l-6 6 6 6'/%3E%3C/svg%3E");
  --arrow-dark: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23591370' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M19 12H5M11 6l-6 6 6 6'/%3E%3C/svg%3E");
}
.button:not(.copy-btn)[dir="rtl"], .group-process .card-wide .card-cta[dir="rtl"] {
  --tip-base: radial-gradient(circle at 0% 50%, transparent var(--r), #000 calc(var(--r) + 0.5px));
  --tip-cut-t: linear-gradient(#000, #000) left 0 top -2px / var(--dx) 7.2px no-repeat;
  --tip-cut-b: linear-gradient(#000, #000) left 0 bottom -2px / var(--dx) 7.2px no-repeat;
  --tip-disc-t: radial-gradient(circle var(--k) at var(--dx) var(--k), #000 calc(var(--k) - 0.5px), transparent var(--k));
  --tip-disc-b: radial-gradient(circle var(--k) at var(--dx) calc(100% - var(--k)), #000 calc(var(--k) - 0.5px), transparent var(--k));
}
.button:not(.copy-btn)[dir="rtl"] { padding: 0 1.75rem 0 0; }
.group-process .card-wide .card-cta[dir="rtl"] { padding: 0 1.55rem 0 0; }
.button:not(.copy-btn)[dir="rtl"]::before, .group-process .card-wide .card-cta[dir="rtl"]::before { left: auto; right: 0; border-radius: 0 999px 999px 0; }
.button:not(.copy-btn)[dir="rtl"]::after { margin-left: 0; margin-right: auto; }
.card-cta[dir="rtl"] .arrow > use { transform: scaleX(-1); transform-box: fill-box; transform-origin: center; }
.contact .split[dir="rtl"] .copy-btn { right: auto; left: 0; }
.bar .wordmark { margin: 0 auto 0 0; }

/* ---- hero portrait, rebuilt from layers when the page animates: hexagons behind, the photo, four hexagons in front.
   Everything is measured on the 1635 x 1417 artwork: the pattern (1635 x 1306) sits 111px down, the photo (cut out at 844 x 1000 from 1052 x 1246) sits 18px in ---- */
.portrait .hero-hex { position: absolute; left: 0; top: 7.83%; width: 100%; height: 92.17%; pointer-events: none; }
.portrait .hero-hex-back { z-index: 1; }
.portrait .hero-cutout { position: absolute; z-index: 2; left: 1.1%; top: 0; width: 64.35%; height: 87.93%; max-width: none; object-fit: fill; pointer-events: none;
  -webkit-mask-image: linear-gradient(#000 84%, transparent 99%); mask-image: linear-gradient(#000 84%, transparent 99%); }
.portrait .hero-hex-front { z-index: 3; }
.portrait .spark { z-index: 4; }
.portrait .hero-plate { position: absolute; z-index: 1; left: 10.4%; top: 72.5%; width: 45.8%; height: 20.5%; background: #fff; border-radius: 14px; filter: blur(5px); pointer-events: none; }
/* Hebrew weights: Noto Sans Hebrew runs a little lighter and wider than the Latin faces, so headings go heavier and the light About text keeps its lightness */
html[lang="he"] .name, html[lang="he"] .section-title, html[lang="he"] .contact-title, html[lang="he"] .case-title, html[lang="he"] .legal h1 { font-weight: 800; }
html[lang="he"] .wordmark, html[lang="he"] .card-title, html[lang="he"] .ring-title { font-weight: 700; }
html[lang="he"] .hero-lead, html[lang="he"] .contact-lead, html[lang="he"] .group-desc { font-weight: 400; }
html[lang="he"] .about-me p { font-weight: 300; }
html[lang="he"] .about-me p b, html[lang="he"] .about-me .is-bold { font-weight: 700; }
html[lang="he"] .role { font-weight: 600; }

/* hexagons along the edges of the hero, added when the page animates; sized from the screen so they scale with it */
.hero-extras { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.hero-extra { position: absolute; width: calc(var(--s) * 1vmin); aspect-ratio: 1; margin: calc(var(--s) * -0.5vmin) 0 0 calc(var(--s) * -0.5vmin); will-change: transform, opacity; }
.hero-extra svg { width: 100%; height: 100%; overflow: visible; }
.hero-grid { position: relative; z-index: 1; }
/* in Hebrew the scroll cue sits on the right */
html[lang="he"] .scroll-cue { left: auto; right: clamp(0.9rem, 2.2vw, 2rem); }
.hero-hex .hex-vec { position: absolute; width: 13.7%; height: 15.3%; will-change: transform, opacity; }   /* a 224 x 200 box out of 1635 x 1306, like the pattern's pieces */
.hero-hex .hex-vec svg { display: block; width: 100%; height: 100%; overflow: visible; }
.hero-extra-w { position: absolute; inset: 0; pointer-events: none; }
