/* Matoma / Girdima: base tokens, type, header, menu, footer, cursor */
:root {
  --ink: #000;
  --paper: #fff;
  --tif: #9ae8ec;
  --coral: #fe424d;
  --grey-on-paper: #595959;
  --grey-on-ink: #b8b8b8;
  --grey-on-tif: #1f1f1f;
  --serif: "Instrument Serif", "Times New Roman", serif;
  --sans: "Bricolage Grotesque", "Helvetica Neue", Arial, sans-serif;
  --pad: clamp(20px, 5vw, 72px);
  --max: 1440px;
  --hd: 68px;
  --ease: cubic-bezier(.2, .7, .1, 1);
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--hd) + 16px); }
body {
  margin: 0; background: var(--ink); color: var(--paper);
  font: 400 1.0625rem/1.6 var(--sans); font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased; overflow-x: clip;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
p, h1, h2, h3, h4, ul, ol, figure, blockquote { margin: 0; }
ul, ol { padding: 0; list-style: none; }
em { font-family: var(--serif); font-style: italic; font-weight: 400; }
b, strong { font-weight: 600; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding-inline: var(--pad); }
main:focus { outline: none; }

/* Grounds */
.g-ink { background: var(--ink); color: var(--paper); --muted: var(--grey-on-ink); --accent: var(--tif); }
.g-paper { background: var(--paper); color: var(--ink); --muted: var(--grey-on-paper); --accent: var(--ink); }
.g-tif { background: var(--tif); color: var(--ink); --muted: var(--grey-on-tif); --accent: var(--ink); }

:focus-visible { outline: 3px solid var(--coral); outline-offset: 3px; border-radius: 2px; }
.g-ink :focus-visible { outline-color: var(--tif); }

.skip {
  position: fixed; left: 12px; top: 12px; z-index: 100; padding: 12px 18px;
  background: var(--tif); color: var(--ink); font-weight: 600; text-decoration: none;
  transform: translateY(-160%); transition: transform .2s;
}
.skip:focus { transform: none; }

/* Type */
.lbl {
  font: 500 .8125rem/1.3 var(--sans); letter-spacing: .14em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 1.4rem;
}
.lbl--tif { color: var(--tif); }
.kicker { font: 500 .875rem/1.5 var(--sans); letter-spacing: .06em; color: var(--muted); }
.kicker a { color: inherit; text-underline-offset: 3px; }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--accent); margin-right: .6em; vertical-align: .05em; }
.h2 { font: 400 clamp(2.4rem, 6vw, 5.2rem)/1 var(--serif); letter-spacing: -.01em; }
.h2 em { color: inherit; }
.g-ink .h2 em, .g-ink h1 em, .g-ink h2 em { color: var(--tif); }

/* Buttons and links */
.btn {
  --b: var(--paper); --c: var(--ink);
  display: inline-flex; align-items: center; justify-content: center; gap: .6em;
  min-height: 52px; padding: .8em 1.5em; border-radius: 999px; border: 1.5px solid var(--b);
  background: var(--b); color: var(--c); font: 600 1rem/1.1 var(--sans); text-decoration: none;
  transition: transform .35s var(--ease), background-color .25s, color .25s;
}
.btn:hover { transform: translateY(-2px); }
.btn--tif { --b: var(--tif); --c: var(--ink); }
.btn--ink { --b: var(--ink); --c: var(--paper); }
.btn--ghost { background: transparent; color: currentColor; border-color: currentColor; }
.btn--ghost:hover { background: var(--paper); color: var(--ink); border-color: var(--paper); }
.btn--sm { min-height: 44px; padding: .6em 1.2em; font-size: .9375rem; }
.ico { width: 1.15em; height: 1.15em; flex: none; transition: transform .35s var(--ease); }
a:hover > .ico { transform: translateX(4px); }
.link-arrow .ico { display: inline-block; vertical-align: -.22em; margin-left: .35em; }
.link-arrow {
  display: inline-block; padding-block: 11px;
  font-weight: 600; text-decoration: underline; text-underline-offset: 5px; text-decoration-thickness: 1.5px;
}
.g-ink .link-arrow { color: var(--tif); }

/* Header */
.hd {
  position: fixed; inset: 0 0 auto; z-index: 50; height: var(--hd);
  display: flex; align-items: center; gap: 24px; padding-inline: var(--pad);
  color: var(--paper); background: var(--ink);
  transition: background-color .35s, color .35s, transform .45s var(--ease);
}
.hd[data-on="paper"] { background: var(--paper); color: var(--ink); }
.hd[data-on="tif"] { background: var(--tif); color: var(--ink); }
.hd.is-hidden { transform: translateY(-100%); }
.hd__logo { display: flex; align-items: center; gap: 10px; text-decoration: none; min-height: 44px; margin-right: auto; }
.hd__ok {
  display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%;
  border: 1.5px solid currentColor; font: italic 400 1.15rem/1 var(--serif); letter-spacing: -.04em;
}
.hd__name { font: 400 1.5rem/1 var(--serif); }
.hd__nav ul { display: flex; gap: 6px; }
.hd__nav a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px;
  text-decoration: none; font-weight: 500; position: relative;
}
.hd__nav a::after {
  content: ""; position: absolute; left: 12px; right: 12px; bottom: 8px; height: 1.5px;
  background: currentColor; transform: scaleX(0); transform-origin: left; transition: transform .35s var(--ease);
}
.hd__nav a:hover::after, .hd__nav a[aria-current]::after { transform: scaleX(1); }
.hd .btn { --b: currentColor; }
.hd[data-on="ink"] .hd__cta, .hd:not([data-on]) .hd__cta { --b: var(--tif); --c: var(--ink); }
.hd[data-on="paper"] .hd__cta, .hd[data-on="tif"] .hd__cta { --b: var(--ink); --c: var(--paper); }
.hd__burger {
  display: none; width: 48px; height: 48px; border: 0; background: transparent; color: inherit;
  cursor: pointer; place-items: center; padding: 0; margin-right: -8px;
}
.hd__bars, .hd__bars::before, .hd__bars::after {
  display: block; width: 26px; height: 2px; background: currentColor; position: relative;
  transition: transform .35s var(--ease), opacity .2s;
}
.hd__bars::before, .hd__bars::after { content: ""; position: absolute; left: 0; }
.hd__bars::before { top: -8px; } .hd__bars::after { top: 8px; }
.hd__burger[aria-expanded="true"] .hd__bars { background: transparent; }
.hd__burger[aria-expanded="true"] .hd__bars::before { transform: translateY(8px) rotate(45deg); }
.hd__burger[aria-expanded="true"] .hd__bars::after { transform: translateY(-8px) rotate(-45deg); }

@media (max-width: 899px) {
  .hd__nav, .hd__cta { display: none; }
  .hd__burger { display: grid; }
  .hd__name { font-size: 1.3rem; }
}

/* Full-screen menu */
.menu {
  position: fixed; inset: 0; z-index: 45; background: var(--ink); color: var(--paper);
  padding: calc(var(--hd) + 24px) var(--pad) 32px; display: flex; flex-direction: column; justify-content: space-between;
  overflow-y: auto;
}
.menu[hidden] { display: none; }
.menu__list a {
  display: block; font: 400 clamp(2.8rem, 13vw, 4.5rem)/1.12 var(--serif); text-decoration: none; padding: 4px 0;
}
.menu__list a:hover, .menu__list a:focus-visible { font-style: italic; color: var(--tif); }
.menu__list li { overflow: hidden; }
.menu.is-open .menu__list a { animation: rise .6s var(--ease) both; }
.menu.is-open .menu__list li:nth-child(2) a { animation-delay: .04s; }
.menu.is-open .menu__list li:nth-child(3) a { animation-delay: .08s; }
.menu.is-open .menu__list li:nth-child(4) a { animation-delay: .12s; }
.menu.is-open .menu__list li:nth-child(5) a { animation-delay: .16s; }
.menu__foot { display: grid; gap: 14px; margin-top: 32px; }
.menu__foot .btn { --b: var(--tif); --c: var(--ink); }
.menu__tel { min-height: 44px; display: inline-flex; align-items: center; font-size: 1.125rem; }
body.menu-open { overflow: hidden; }
body.menu-open .hd { background: var(--ink); color: var(--paper); }

/* Kinetic words */
.kw { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .08em; margin-bottom: -.08em; }
.kw__i { display: inline-block; }
.js .kw__i { animation: rise .7s var(--ease) both; animation-delay: calc(var(--i) * 26ms + 60ms); }
@keyframes rise { from { transform: translateY(105%); } to { transform: none; } }

/* Clip reveal for hero photos */
.js [data-reveal-clip] img { animation: clipin 1.1s var(--ease) .15s both; }
@keyframes clipin { from { clip-path: inset(100% 0 0 0); transform: scale(1.12); } to { clip-path: inset(0 0 0 0); transform: none; } }

/* Scroll reveals */
.js .rv { opacity: 0; transform: translateY(28px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.js .rv.in { opacity: 1; transform: none; }

/* Footer */
.ft { padding: clamp(56px, 9vw, 120px) 0 28px; }
.ft__grid { display: grid; gap: 40px; grid-template-columns: 1fr; }
.ft__say { font: 400 clamp(2.6rem, 8vw, 6rem)/1 var(--serif); margin-bottom: 20px; }
.ft__mail { display: inline-block; font: 500 clamp(1.15rem, 2.4vw, 1.6rem)/1.3 var(--sans); text-underline-offset: 6px; word-break: break-word; min-height: 44px; }
.ft__tel { display: block; margin-top: 6px; font-size: 1.125rem; min-height: 44px; padding-top: 8px; }
.ft__col ul { display: grid; gap: 2px; }
.ft__col a { display: inline-flex; align-items: center; gap: .4em; min-height: 44px; text-decoration: none; font-weight: 500; }
.ft__col a:hover { text-decoration: underline; text-underline-offset: 4px; }
.ft__base { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; margin-top: 56px; padding-top: 20px; border-top: 1.5px solid var(--ink); font-size: .9375rem; }
@media (min-width: 900px) { .ft__grid { grid-template-columns: 2fr 1fr 1fr; } }

/* Custom cursor (desktop fine pointers only) */
.cursor { display: none; }
@media (hover: hover) and (pointer: fine) {
  .has-cursor .cursor {
    display: grid; place-items: center; position: fixed; left: 0; top: 0; z-index: 90; pointer-events: none;
    width: 84px; height: 84px; margin: -42px 0 0 -42px; will-change: transform;
  }
  .cursor span {
    display: grid; place-items: center; width: 100%; height: 100%; border-radius: 50%;
    background: var(--tif); color: var(--ink); font: 600 .9375rem/1 var(--sans);
    transform: scale(.14); transition: transform .35s var(--ease), background-color .25s;
  }
  .cursor span::after { content: attr(data-label); opacity: 0; transition: opacity .2s; }
  .cursor.is-big span { transform: scale(1); }
  .cursor.is-big span::after { opacity: 1; }
  .cursor.on-tif span { background: var(--ink); color: var(--tif); }
  .cursor.is-hidden span { transform: scale(0); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .js .rv { opacity: 1; transform: none; }
  .cursor { display: none !important; }
}
