/* Arts of Aurelia Foundation: update of the original site
   Palette taken from the original: cream #F2F1EC, ink #242424, gold #795801, taupe #746B58
   Type from the original: League Spartan (text) + Caudex (the word AURELIA) */

:root {
  --cream: #f2f1ec;
  --ink: #242424;
  --gold: #795801;
  --taupe: #746b58;
  --line: #242424;
  --soft: rgba(36, 36, 36, 0.28);
  --sans: "League Spartan", "Century Gothic", "Helvetica Neue", Arial, sans-serif;
  --serif: "Caudex", Georgia, "Times New Roman", serif;
  --gutter: clamp(18px, 3.2vw, 48px);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--cream); color: var(--ink);
  font-family: var(--sans); font-weight: 400; font-size: 1.125rem; line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-underline-offset: 3px; }
a:hover { color: var(--gold); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.gold { color: var(--gold); }

.skip { position: absolute; left: 10px; top: -60px; background: var(--ink); color: var(--cream); padding: 10px 16px; z-index: 99; }
.skip:focus { top: 10px; color: var(--cream); }

/* ---------- Header: logo between two rules, as in the original ---------- */
.top { padding: 14px var(--gutter) 0; }
.brandrow { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: clamp(16px, 4vw, 56px); }
.brandrow .rule { height: 1px; background: var(--line); opacity: 0.6; }
.brand { display: block; line-height: 0; }
.brand img { height: clamp(56px, 7vw, 84px); width: auto; }
.nav { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px clamp(22px, 4vw, 52px); padding: 14px 0 16px; }
.nav a { text-decoration: none; font-size: 1rem; padding: 4px 0; border-bottom: 1px solid transparent; }
.nav a:hover { border-bottom-color: var(--gold); }

/* Outlined button, as the original "Book Now" / "Read the Magna Carta" */
.btn {
  display: inline-block; text-decoration: none; font-family: var(--sans); font-size: 1rem; cursor: pointer;
  background: var(--cream); color: var(--ink); border: 1px solid var(--ink); border-radius: 6px; padding: 10px 20px;
  transition: background 0.2s, color 0.2s;
}
.btn:hover { background: var(--ink); color: var(--cream); }
.btn .arr { margin-inline-start: 8px; }
.btns { display: flex; flex-wrap: wrap; gap: 12px; }
.btn .ico { width: 1.35em; height: 1.35em; vertical-align: -0.32em; margin-inline-end: 9px; color: var(--gold); transition: color 0.3s ease; }
.btn:hover .ico { color: var(--cream); }

/* ---------- Hero ---------- */
.photos { display: grid; grid-template-columns: 1.9fr 1fr; gap: 6px; height: clamp(240px, 38vw, 560px); padding: 0 var(--gutter); margin-top: 6px; }
.photos img { width: 100%; height: 100%; object-fit: cover; }
.photos .p1 img { object-position: 50% 54%; }

.hero { display: grid; grid-template-columns: 1.15fr 1fr; gap: clamp(24px, 4vw, 64px); padding: clamp(28px, 4vw, 56px) var(--gutter) clamp(40px, 6vw, 88px); align-items: start; }
.loc { font-size: clamp(1.5rem, 3.3vw, 2.95rem); font-weight: 400; margin: 0 0 10px; line-height: 1.1; }
.addr { font-size: 0.95rem; margin: 0 0 clamp(18px, 3vw, 40px); margin-inline-start: 4px; }
.title { margin: 0; font-weight: 400; line-height: 1.08; font-size: clamp(2.7rem, 7.4vw, 6.7rem); letter-spacing: 0; }
.title .t1 { font-weight: 700; }
.title .t2 { font-family: var(--serif); color: var(--gold); font-weight: 400; }
.title .t3 { font-weight: 300; display: block; }
.mission { font-size: clamp(1.25rem, 2.05vw, 1.9rem); line-height: 1.22; letter-spacing: -0.02em; margin: 0 0 1em; font-weight: 400; max-width: 22em; }
.mission-col .btn { margin-top: 8px; }

/* ---------- Full width photo ---------- */
.bleed { margin: 0; position: relative; }
.bleed img { width: 100%; height: clamp(300px, 62vw, 860px); object-fit: cover; object-position: 50% 60%; }
.bleed figcaption { position: absolute; inset-inline-start: var(--gutter); bottom: 16px; font-size: 0.95rem; color: #fff; text-shadow: 0 1px 8px rgba(0,0,0,0.55); }

/* ---------- Sections ---------- */
.section { padding: clamp(56px, 9vw, 120px) var(--gutter); }
.section + .section { border-top: 1px solid var(--soft); }
.kicker { font-size: 1rem; margin: 0 0 6px; color: var(--taupe); }
.h2 { font-size: clamp(1.8rem, 3.2vw, 2.9rem); font-weight: 400; margin: 0 0 0.5em; line-height: 1.1; letter-spacing: -0.01em; }
.cols { display: grid; grid-template-columns: 1fr 1.25fr; gap: clamp(28px, 6vw, 96px); align-items: start; }
.prose p { margin: 0 0 1em; max-width: 36em; }
.prose .lead { font-size: clamp(1.2rem, 1.9vw, 1.6rem); line-height: 1.3; letter-spacing: -0.01em; }
.formula { font-size: clamp(1.3rem, 2.4vw, 2rem); line-height: 1.2; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink); padding: 16px 0; margin: 0 0 1.2em; max-width: 24em; letter-spacing: -0.01em; }

/* Allocation list: same row style as the original "Hair Styling (01)" list */
.rows { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--ink); }
.rows li { display: grid; grid-template-columns: 1fr auto; gap: 12px 24px; align-items: baseline; padding: 18px 0 16px; border-bottom: 1px solid var(--ink); }
.rows .name { font-weight: 300; font-size: clamp(1.4rem, 3.4vw, 2.9rem); line-height: 1.05; letter-spacing: -0.03em; }
.rows .pct { font-family: var(--serif); color: var(--gold); font-size: clamp(1.4rem, 3.4vw, 2.9rem); line-height: 1; }
.rows .note { grid-column: 1 / -1; font-size: 0.95rem; color: var(--taupe); margin: 0; max-width: 46em; }
.rows .tbd .pct { color: var(--taupe); }
.rowtotal { display: flex; justify-content: space-between; margin: 14px 0 0; font-size: 0.95rem; color: var(--taupe); }

/* ---------- Gallery ---------- */
.gallery { display: grid; grid-template-columns: 1fr 1.35fr; gap: 6px; margin-top: 28px; }
.gallery figure { margin: 0; }
.gallery img { width: 100%; height: 100%; object-fit: cover; }
.gallery .tall img { aspect-ratio: 4 / 4.2; }
.gallery .map img { aspect-ratio: 4 / 3; }
.gallery figcaption { font-size: 0.95rem; color: var(--taupe); padding-top: 8px; }

/* ---------- About ---------- */
.facts { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--soft); }
.facts li { padding: 16px 0; border-bottom: 1px solid var(--soft); }
.facts strong { display: block; font-weight: 700; }

/* ---------- Contact ---------- */
.form { display: grid; gap: 18px; max-width: 540px; }
.field label { display: block; margin-bottom: 4px; font-size: 1rem; }
.field input, .field select, .field textarea {
  width: 100%; font: inherit; color: var(--ink); background: transparent; border: 1px solid var(--taupe); border-radius: 6px; padding: 12px 14px;
}
.field textarea { min-height: 140px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--gold); outline-offset: 1px; border-color: var(--gold); }
.hint { font-size: 0.9rem; color: var(--taupe); margin: 4px 0 0; }
.hp { position: absolute; left: -9999px; }

/* ---------- Footer ---------- */
.foot { padding: 40px var(--gutter) 36px; border-top: 1px solid var(--ink); font-size: 0.95rem; }
.foot .row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 32px; }
.foot p { margin: 0 0 0.5em; max-width: 60em; color: var(--taupe); }

/* ---------- Inner pages ---------- */
.plain { padding: clamp(40px, 6vw, 80px) var(--gutter); max-width: 820px; }
.plain h1 { font-weight: 300; font-size: clamp(2.2rem, 5vw, 3.6rem); margin: 0 0 0.6em; letter-spacing: -0.02em; }
.plain h2 { font-size: 1.4rem; margin: 1.6em 0 0.3em; }

/* ---------- Magna Carta page ---------- */
.charter { position: relative; overflow: hidden; padding: clamp(40px, 7vw, 96px) var(--gutter) clamp(56px, 8vw, 112px); }
.charter article { position: relative; max-width: 40em; margin: 0 auto; }
.mc-head { text-align: center; margin-bottom: clamp(28px, 4vw, 52px); }
.mc-head h1 { font-family: var(--serif); color: var(--gold); font-weight: 400; font-size: clamp(2.6rem, 6.4vw, 5rem); line-height: 1.05; margin: 0.1em 0 0.3em; }
.mc-note { font-size: 0.95rem; color: var(--taupe); margin: 0; }
.mc-body p { font-size: clamp(1.1rem, 1.5vw, 1.3rem); line-height: 1.6; margin: 0 0 1.15em; }
.mc-body sup { line-height: 0; }
[dir="ltr"]:not([data-lang="ja"]):not([data-lang="zh"]) .mc-body p:first-child::first-letter { font-family: var(--serif); color: var(--gold); float: inline-start; font-size: 3.4em; line-height: 0.9; margin-inline-end: 0.08em; padding-top: 0.06em; }
.mc-sign { margin: clamp(28px, 4vw, 48px) 0 clamp(32px, 5vw, 56px); padding-top: 24px; border-top: 1px solid var(--soft); text-align: center; }
.mc-sign p { margin: 0 0 0.4em; }
.mc-sign .sig { font-family: var(--serif); color: var(--gold); font-size: 1.6rem; letter-spacing: 0.18em; }
.charter article > p:last-child { text-align: center; }

@media (max-width: 860px) {
  .photos { grid-template-columns: 1.3fr 1fr; }
  .hero, .cols, .gallery { grid-template-columns: 1fr; }
  .brandrow { gap: 14px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* ======================================================================
   Effects. Gold-themed, enabled by the "fx" class (set in <head> only when
   the visitor has not asked for reduced motion).
   ====================================================================== */

/* Scroll progress: a thin gold line */
.progress { position: fixed; left: 0; top: 0; height: 2px; width: 100%; background: linear-gradient(90deg, #795801, #d9b45a); transform: scaleX(var(--p, 0)); transform-origin: left; z-index: 100; pointer-events: none; }

/* Nav underline grows; buttons fill with ink from the left */
.nav a { border-bottom: 0; background: linear-gradient(var(--gold), var(--gold)) 0 100% / 0 1px no-repeat; transition: background-size 0.35s ease; }
.nav a:hover { background-size: 100% 1px; border-bottom-color: transparent; }
.btn { position: relative; overflow: hidden; z-index: 0; isolation: isolate; transition: color 0.3s ease; }
.btn::before { content: ""; position: absolute; inset: 0; background: var(--ink); transform: translateX(-101%); transition: transform 0.4s cubic-bezier(0.7, 0, 0.2, 1); z-index: -1; }
.btn:hover { background: var(--cream); color: var(--cream); }
.btn:hover::before { transform: none; }

/* Photos: wipe-in, settle zoom, parallax and tilt */
.wipe { position: relative; overflow: hidden; }
.wipe img { scale: 1.08; transform: translate3d(0, var(--py, 0px), 0); will-change: transform; }
.fx .wipe { clip-path: inset(0 0 100% 0); transition: clip-path 1.3s cubic-bezier(0.7, 0, 0.2, 1) var(--d, 0s); }
.fx .wipe.in { clip-path: inset(0 0 0 0); }
.fx .wipe img { scale: 1.3; transition: scale 1.9s cubic-bezier(0.2, 0.7, 0.2, 1) var(--d, 0s); }
.fx .wipe.in img { scale: 1.08; }
.p2 { --d: 0.25s; }

.tilt { will-change: transform; }
.fx .tilt { transition: clip-path 1.3s cubic-bezier(0.7, 0, 0.2, 1) var(--d, 0s), transform 0.25s ease-out; }
.tilt::after { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity 0.3s; background: radial-gradient(circle at var(--gx, 50%) var(--gy, 50%), rgba(255, 236, 170, 0.6), rgba(255, 236, 170, 0) 55%); mix-blend-mode: soft-light; }
.tilt.is-hover::after { opacity: 1; }

/* The map drifts slowly */
.map .wipe img { transform: none; animation: drift 28s ease-in-out infinite alternate; }
@keyframes drift { from { transform: scale(1) translate(0, 0); } to { transform: scale(1.1) translate(-1.5%, -1%); } }

/* Text reveals */
.fx :is(.kicker, .h2, .prose, .facts li, .form, .rowtotal, .hero .mission, .hero .loc, .hero .addr, .hero .mission-col .btn, .gallery figcaption) {
  opacity: 0; transform: translateY(22px);
  transition: opacity 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) var(--d, 0s), transform 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) var(--d, 0s), color 0.3s ease;
}
.fx :is(.kicker, .h2, .prose, .facts li, .form, .rowtotal, .hero .mission, .hero .loc, .hero .addr, .hero .mission-col .btn, .gallery figcaption).in { opacity: 1; transform: none; }

/* Header intro: rules draw toward the logo */
.fx .brand img { animation: fadein 1.4s ease both; }
.fx .brandrow .rule { animation: draw 1.6s cubic-bezier(0.7, 0, 0.2, 1) 0.2s both; }
.fx .brandrow .rule:first-child { transform-origin: right; }
.fx .brandrow .rule:last-child { transform-origin: left; }
@keyframes draw { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes fadein { from { opacity: 0; transform: scale(0.92); } to { opacity: 1; transform: none; } }

/* Title: words rise one after another, then a gold glint crosses AURELIA */
.title .t2 {
  background: linear-gradient(100deg, #795801 0%, #795801 38%, #d6ad4f 47%, #fff0b8 50%, #d6ad4f 53%, #795801 62%, #795801 100%);
  background-size: 260% 100%; background-position: 100% 0;
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: var(--gold);
}
.fx .title span { display: inline-block; animation: rise 1.2s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
.fx .title .t1 { animation-delay: 0.1s; }
.fx .title .t2 { animation: rise 1.2s cubic-bezier(0.2, 0.7, 0.2, 1) 0.28s both, shimmer 7s ease-in-out 2s infinite; }
.fx .title .t3 { animation-delay: 0.46s; display: block; }
@keyframes rise { from { opacity: 0; transform: translateY(45%); } to { opacity: 1; transform: none; } }
@keyframes shimmer { 0%, 55% { background-position: 100% 0; } 100% { background-position: 0 0; } }

/* Gold dust behind the hero */
.hero { position: relative; isolation: isolate; }
.dust { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none; }

/* Marquee band */
.marquee { overflow: hidden; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink); padding: 18px 0; background: var(--cream); }
.marquee .track { display: flex; width: max-content; animation: marquee 48s linear infinite; }
.marquee:hover .track { animation-play-state: paused; }
.marquee span { display: flex; align-items: center; gap: clamp(20px, 3vw, 44px); padding: 0 clamp(20px, 3vw, 44px); font-weight: 300; font-size: clamp(1.8rem, 5vw, 4.2rem); letter-spacing: -0.03em; line-height: 1; white-space: nowrap; }
.marquee span::after { content: ""; display: block; width: 0.16em; height: 0.16em; background: var(--gold); transform: rotate(45deg); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* Allocation rows: rules draw, text rises, numbers count up */
.rows li { position: relative; }
.fx .rows li { border-bottom-color: transparent; }
.fx .rows li::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: var(--ink); transform: scaleX(0); transform-origin: left; transition: transform 1.2s cubic-bezier(0.7, 0, 0.2, 1) calc(var(--i, 0) * 0.12s); }
.fx .rows li.in::after { transform: scaleX(1); }
.fx .rows li .name, .fx .rows li .note, .fx .rows li .pct { opacity: 0; transform: translateY(14px); transition: opacity 0.8s ease calc(var(--i, 0) * 0.12s + 0.2s), transform 0.8s ease calc(var(--i, 0) * 0.12s + 0.2s); }
.fx .rows li.in .name, .fx .rows li.in .note, .fx .rows li.in .pct { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .marquee .track, .map .wipe img { animation: none; }
  .wipe img { scale: 1; }
}

/* ======================================================================
   Golden-ratio spirals: a barely-there gold line drawing behind the content.
   ====================================================================== */
.section { position: relative; isolation: isolate; overflow: hidden; }
.hero { overflow: hidden; }
.gr {
  position: absolute; z-index: -2; pointer-events: none;
  width: clamp(520px, 66vw, 1180px); height: auto;
  stroke: var(--gold); fill: none; opacity: 0.2;
  transform: translate3d(0, var(--dy, 0px), 0) rotate(var(--rot, 0deg)) scaleX(var(--fx, 1));
  will-change: transform;
}
.gr--a { right: -6%; top: 2%; --rot: -10deg; }
.gr--b { left: -10%; top: 4%; --rot: 96deg; }
.gr--c { right: -8%; bottom: -14%; --rot: -168deg; --fx: -1; }
.gr--d { left: -8%; top: -12%; --rot: 28deg; width: clamp(420px, 52vw, 900px); }
.gr--e { right: -6%; bottom: -16%; --rot: 204deg; width: clamp(420px, 56vw, 960px); }

/* The line draws itself the first time its section comes into view */
.fx .gr { stroke-dasharray: 1 1; stroke-dashoffset: var(--o, 1); transition: stroke-dashoffset 3.6s cubic-bezier(0.5, 0, 0.2, 1); }
.fx .gr.in { --o: 0; }
@media (max-width: 860px) { .gr { opacity: 0.13; } }

/* ======================================================================
   Languages: selector, per-script fonts, right-to-left (Arabic)
   ====================================================================== */
.top { position: relative; z-index: 20; }
.brandrow, .marquee { direction: ltr; }          /* symmetrical / animated: keep the same in every language */
.nav { align-items: center; }
.lang { position: relative; font-size: 0.95rem; }
.lang summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px; border: 1px solid var(--soft); border-radius: 999px; transition: border-color 0.25s, color 0.25s; user-select: none; }
.lang summary::-webkit-details-marker { display: none; }
.lang summary:hover, .lang[open] summary { border-color: var(--gold); color: var(--gold); }
.lang summary svg { width: 16px; height: 16px; flex: none; }
.lang summary .chev { width: 9px; height: 9px; transition: transform 0.25s; }
.lang[open] summary .chev { transform: rotate(180deg); }
.lang ul { position: absolute; inset-inline-end: 0; top: calc(100% + 8px); margin: 0; padding: 6px; list-style: none; min-width: 170px; background: var(--cream); border: 1px solid var(--ink); box-shadow: 0 14px 34px rgba(36, 36, 36, 0.16); z-index: 30; }
.lang li { margin: 0; }
.nav .lang a { display: flex; justify-content: space-between; gap: 18px; padding: 8px 12px; background: none; border: 0; font-size: 1rem; }
.nav .lang a:hover, .nav .lang a:focus-visible { background: rgba(121, 88, 1, 0.1); color: var(--gold); }
.nav .lang a[aria-current="true"] { color: var(--gold); }
.nav .lang a[aria-current="true"]::after { content: "\2713"; }
.fx .lang[open] ul { animation: langin 0.22s ease both; }
@keyframes langin { from { opacity: 0; transform: translateY(-6px); } }

html[lang^="zh"] { --sans: "League Spartan", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif; --serif: "Caudex", "Noto Sans SC", serif; }
html[lang="ja"] { --sans: "League Spartan", "Noto Sans JP", "Hiragino Sans", "Yu Gothic", Meiryo, sans-serif; --serif: "Caudex", "Noto Sans JP", serif; }
html[lang="ru"] { --sans: "League Spartan", "Noto Sans", "Helvetica Neue", Arial, sans-serif; --serif: "Caudex", Georgia, serif; }
html[lang="he"] { --sans: "League Spartan", "Noto Sans Hebrew", "Arial Hebrew", Arial, sans-serif; --serif: "Caudex", "Noto Sans Hebrew", serif; }
html[lang="ar"] { --sans: "League Spartan", "Noto Naskh Arabic", "Geeza Pro", "Segoe UI", sans-serif; --serif: "Caudex", "Noto Naskh Arabic", serif; }

/* Non-Latin scripts: no tight tracking, more generous line height */
html:is([lang^="zh"], [lang="ja"], [lang="he"], [lang="ar"]) { line-height: 1.7; }
html:is([lang^="zh"], [lang="ja"], [lang="he"], [lang="ar"], [lang="ru"]) :is(.mission, .h2, .rows .name, .prose .lead, .formula, .marquee span, .rows .pct) { letter-spacing: 0; }
html:is([lang^="zh"], [lang="ja"], [lang="he"], [lang="ar"]) .mission { line-height: 1.5; }
html:is([lang^="zh"], [lang="ja"], [lang="he"], [lang="ar"]) :is(.h2, .rows .name, .formula, .prose .lead) { line-height: 1.35; }
html:is([lang^="zh"], [lang="ja"], [lang="he"], [lang="ar"]) .marquee span { line-height: 1.4; }
html:is([lang="he"], [lang="ar"]) .rows .name { font-weight: 400; }
html:is([lang="he"], [lang="ar"], [lang="ja"]) .kicker { letter-spacing: 0; }

/* Long words in narrow columns */
.rows .name, .h2, .facts li { overflow-wrap: break-word; }

[dir="rtl"] .btn::before { transform: translateX(101%); }
[dir="rtl"] .btn:hover::before, [dir="rtl"] .btn:focus-visible::before { transform: none; }
[dir="rtl"] .form :is(input, textarea, select) { text-align: right; }
[dir="rtl"] .progress { transform-origin: right; }
[dir="rtl"] .fx .rows li::after { transform-origin: right; }


/* Pegasus monogram band (Jarocki paintings as a repeating pattern) */
.pegband { position: relative; overflow: hidden; height: clamp(150px, 20vw, 260px); margin-top: clamp(40px, 6vw, 90px); background: #795801; }
.pegtrack { position: absolute; inset: 0; background-repeat: repeat-x; background-size: auto 100%; animation: pegdrift 120s linear infinite; }
.pegband::after { content: ""; position: absolute; inset: 0; pointer-events: none; box-shadow: inset 0 0 60px rgba(36,36,36,.35); }
@keyframes pegdrift { to { background-position: -100vw 0; } }
@media (prefers-reduced-motion: reduce) { .pegtrack { animation: none; } }
.dym-lead { font-size: clamp(1.2rem, 1.9vw, 1.6rem); line-height: 1.3; letter-spacing: -0.01em; max-width: 20em; margin: 0; }
html:is([lang^="zh"], [lang="ja"], [lang="he"], [lang="ar"], [lang="ru"]) .dym-lead { letter-spacing: 0; line-height: 1.5; }
