/* ==========================================================================
   chrome.css: header, ruler rail, mobile menu (page index), social icon links
   ========================================================================== */

:root { --hl: var(--ink); }
:root[data-theme="dark"]:not([data-vt="light"]), :root[data-vt="dark"] { --hl: var(--gold); }

/* ---------- header: a title strip pinned to the top of the sheet ---------- */
.hdr { position: fixed; inset: 0 0 auto; z-index: 60; height: var(--hdr); background: var(--bg); border-bottom: 1px solid var(--line-2); }
.hdr__in { display: flex; align-items: stretch; height: 100%; width: min(100% - 2 * var(--gutter), var(--maxw)); margin-inline: auto; }
.logo { display: flex; align-items: center; margin-right: auto; padding-right: 8px; }
.logo__svg { height: 30px; width: auto; overflow: visible; }
.logo__au path, .mark__au path { fill: var(--gold); }
.logo__sh path, .mark__sh path { fill: var(--slab-shadow); }
.logo__wm { fill: var(--ink); }

.nav { display: none; }
.nav ul { display: flex; align-items: stretch; height: 100%; }
.nav a {
  position: relative; display: flex; align-items: center; height: 100%; padding-inline: clamp(10px, 1.15vw, 18px);
  font: 600 .75rem/1 var(--font-display); font-stretch: 92%; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2);
  transition: color .3s;
}
.nav a::after { /* the active sheet is marked with a slab on the header rule */
  content: ""; position: absolute; left: clamp(10px, 1.15vw, 18px); right: clamp(10px, 1.15vw, 18px); bottom: -1px; height: 3px;
  background: var(--hl); transform: scaleX(0); transform-origin: 0 50%; transition: transform .5s var(--ease);
}
.nav a.is-current, .nav a:active { color: var(--ink); }
.nav a.is-current::after { transform: none; }
@media (hover: hover) {
  .nav a:hover { color: var(--ink); }
  .nav a:hover::after { transform: none; }
}

.hdr__tools { display: flex; align-items: stretch; }
.lang { display: flex; align-items: center; padding-inline: 2px; border-left: 1px solid var(--line); }
.lang button {
  position: relative; min-width: 44px; height: 44px; padding: 0 4px;
  font: 500 var(--fs-ann)/1 var(--font-mono); letter-spacing: .08em; color: var(--ink-2); transition: color .3s;
}
.lang button::after { content: ""; position: absolute; left: 8px; right: 8px; bottom: 9px; height: 2px; background: var(--hl); transform: scaleX(0); transition: transform .4s var(--ease); }
.lang button[aria-pressed="true"] { color: var(--ink); }
.lang button[aria-pressed="true"]::after { transform: none; }
.tool { display: grid; place-items: center; width: 44px; border-left: 1px solid var(--line); color: var(--ink); }
.tool svg { width: 20px; height: 20px; transition: transform .6s var(--ease); }
.tool:active, .lang button:active { background: var(--bg-2); }
:root[data-theme="dark"] .tool[data-action="toggle-theme"] svg { transform: rotate(180deg); }
.hdr__cta {
  position: relative; isolation: isolate; display: none; align-items: center; padding-inline: 26px;
  background: var(--bar-pri-bg); color: var(--bar-pri-fg); box-shadow: inset 0 -2px 0 var(--bar-pri-rule);   /* dark: a quiet slab with a gold rule; solid gold is kept for the buttons inside the pages */
  font: 650 .75rem/1 var(--font-display); font-stretch: 92%; letter-spacing: .08em; text-transform: uppercase; transition: color .35s var(--ease);
}
.hdr__cta::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--gold); clip-path: inset(100% 0 0 0); transition: clip-path .5s var(--ease); }
.hdr__cta:focus-visible { outline-offset: -5px; outline-color: var(--bar-pri-fg); }
.hdr__cta:active { color: var(--green-900); }
.hdr__cta:active::before { clip-path: inset(0); }
@media (hover: hover) {
  .hdr__cta:hover { color: var(--green-900); }
  .hdr__cta:hover::before { clip-path: inset(0); }
}
.burger { position: relative; display: block; width: 20px; height: 9px; }
.burger i { position: absolute; left: 0; right: 0; height: 1.5px; background: currentColor; transition: transform .45s var(--ease), top .45s var(--ease); }
.burger i:nth-child(1) { top: 0; }
.burger i:nth-child(2) { top: calc(100% - 1.5px); }
[aria-expanded="true"] .burger i { top: calc(50% - .75px); }
[aria-expanded="true"] .burger i:nth-child(1) { transform: rotate(45deg); }
[aria-expanded="true"] .burger i:nth-child(2) { transform: rotate(-45deg); }

.hdr__prog { position: absolute; left: 0; right: 0; bottom: -2px; height: 2px; pointer-events: none; }
.hdr__prog i { display: block; height: 100%; background: var(--hl); transform-origin: 0 50%; transform: scaleX(0); }   /* scaled by js/ui.js */

@media (min-width: 900px) {
  .hdr__in { border-inline: 1px solid var(--line); }
  .logo { padding-left: var(--pad); }
  .logo__svg { height: 32px; }
  .hdr__cta { display: flex; }
  .tool { width: 56px; }
  .lang { padding-inline: 8px; }
}
@media (min-width: 1100px) {
  .nav { display: block; }
  .hdr__burger { display: none; }
  .hdr__prog { display: none; }
}

/* ---------- ruler rail: page progress drawn as a scale ---------- */
.rail { display: none; }
@media (min-width: 1280px) {
  .rail {
    display: block; position: fixed; left: 0; top: var(--hdr); bottom: 0; width: 18px; z-index: 40; pointer-events: none;
    border-right: 1px solid var(--line);
    background:
      repeating-linear-gradient(to bottom, var(--line-2) 0 1px, transparent 1px 64px) 100% 0 / 10px 100% no-repeat,
      repeating-linear-gradient(to bottom, var(--line) 0 1px, transparent 1px 8px) 100% 0 / 5px 100% no-repeat;
  }
  /* page numbers beside their ticks, click to jump (the header and footer hold the accessible navigation) */
  .rail__mk { position: absolute; left: 0; width: 18px; height: 1px; background: var(--ink-3); pointer-events: auto; visibility: hidden; }
  .rail.is-set .rail__mk { visibility: visible; }
  .rail__mk span {
    position: absolute; left: 24px; top: 5px; writing-mode: vertical-rl; white-space: nowrap; padding: 4px 0;
    font: 500 .75rem/1 var(--font-mono); letter-spacing: .1em; color: var(--ink-3); transition: color .3s;
  }
  .rail__mk::after { content: ""; position: absolute; left: 0; top: -8px; width: 44px; height: 60px; }   /* comfortable hit area */
  .rail__mk.is-current span, .rail__mk:hover span { color: var(--ink); }
  .rail__pos { position: absolute; left: 0; right: -6px; top: -1px; height: 3px; background: var(--hl); transition: opacity .3s; }   /* moved by js/ui.js */
  .rail__pos::after { content: ""; position: absolute; right: -1px; top: -3px; border: 4.5px solid transparent; border-left-color: var(--hl); border-right: 0; transform: translateX(100%); }
  .rail.is-top .rail__pos { opacity: 0; }
}

/* ---------- mobile menu: the sheet index ---------- */
.menu {
  position: fixed; inset: var(--hdr) 0 0; z-index: 55; overflow-y: auto; overscroll-behavior: contain;
  background-color: var(--bg);
  background-image: linear-gradient(to right, var(--grid-2) 1px, transparent 1px), linear-gradient(to bottom, var(--grid-2) 1px, transparent 1px);
  background-size: 64px 64px; background-position: var(--gutter) 0;
  clip-path: inset(0 0 100% 0); transition: clip-path .55s var(--ease-io);
}
.menu.is-open { clip-path: inset(0); }
.menu__in { display: flex; flex-direction: column; min-height: 100%; width: min(100% - 2 * var(--gutter), 720px); margin-inline: auto; padding-block: 28px calc(28px + env(safe-area-inset-bottom)); }
.menu__label { padding-bottom: 12px; border-bottom: 1px solid var(--line-2); }
.menu__list a {
  display: flex; align-items: baseline; gap: 14px; padding: 15px 0 13px; border-bottom: 1px solid var(--line);
  font: 750 clamp(1.7rem, 8.6vw, 2.75rem)/1.05 var(--font-display); font-stretch: 85%; text-transform: uppercase;
  opacity: 0; transform: translateY(14px); transition: opacity .5s var(--ease), transform .6s var(--ease);
}
.menu.is-open .menu__list a { opacity: 1; transform: none; }
.menu__list li:nth-child(1) a { transition-delay: .12s; } .menu__list li:nth-child(2) a { transition-delay: .16s; }
.menu__list li:nth-child(3) a { transition-delay: .2s; } .menu__list li:nth-child(4) a { transition-delay: .24s; }
.menu__list li:nth-child(5) a { transition-delay: .28s; } .menu__list li:nth-child(6) a { transition-delay: .32s; }
.menu__code { flex: none; width: 46px; font: 500 var(--fs-ann)/1 var(--font-mono); letter-spacing: .1em; color: var(--ink-2); transform: translateY(-.5em); }
.menu__list a:active { color: var(--gold-text); }
.menu__foot { display: grid; gap: 18px; margin-top: auto; padding-top: 28px; }
.menu__row { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 14px 16px; }
.menu__tel { display: grid; gap: 6px; min-height: 44px; }
.menu__tel .mono { font-size: clamp(1.25rem, 6vw, 1.5rem); font-weight: 500; letter-spacing: .02em; white-space: nowrap; }
.menu__soc { display: flex; border: 1px solid var(--line-2); }
.menu__soc .soc + .soc { border-left: 1px solid var(--line-2); }

/* ---------- social icon links (WhatsApp · Instagram · Facebook): one ink colour, never brand colours ---------- */
.soc { position: relative; display: grid; place-items: center; width: 48px; height: 48px; color: var(--ink); transition: background-color .3s, color .3s; }
.soc .ico { width: 22px; height: 22px; }
.soc:focus-visible { outline-offset: -4px; }
.soc:active { background: var(--ink); color: var(--bg); }
@media (hover: hover) { .soc:hover { background: var(--ink); color: var(--bg); } }
