/* Veritstay — shared styles */
:root {
  --bg: #F2EFE7;
  --bg-2: #ECE8DD;
  --ink: #14171C;
  --ink-2: #2A2E36;
  --muted: #6A6E78;
  --line: rgba(20, 23, 28, 0.10);
  --line-soft: rgba(20, 23, 28, 0.06);
  --sage: #6B8A86;
  --sage-deep: #3F5C5A;
  --sand: #C9B58E;

  --serif: "Instrument Serif", "Cormorant Garamond", "Times New Roman", serif;
  --sans: "Geist", "Inter Tight", -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --mono: "Geist Mono", ui-monospace, "JetBrains Mono", monospace;
}

* { box-sizing: border-box; cursor: none; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "ss01", "cv11";
}

body {
  min-height: 100vh;
  position: relative;
  overflow: hidden;
}

a { color: inherit; text-decoration: none; }

/* ---------- Top nav ---------- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 36px;
  gap: 14px;
  isolation: isolate;
}
.nav::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(
    to bottom,
    rgba(242,239,231,0.72) 0%,
    rgba(242,239,231,0.45) 60%,
    rgba(242,239,231,0.00) 100%
  );
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  mask-image: linear-gradient(to bottom, #000 0%, #000 60%, transparent 100%);
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 60%, transparent 100%);
  pointer-events: none;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
}
.brand svg { display: block; height: 22px; width: auto; }
.brand-mark {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--sage-deep);
  display: inline-block;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  letter-spacing: 0.01em;
}

.lang-toggle {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  padding: 7px 11px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.5);
  color: var(--ink-2);
  border-radius: 999px;
  cursor: pointer;
  transition: all 200ms ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-right: 8px;
}
.lang-toggle:hover { border-color: var(--ink); color: var(--ink); }
.lang-toggle-icon {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
  opacity: 0.85;
}
.lang-toggle-label { line-height: 1; }
.nav-links a {
  padding: 8px 14px;
  border-radius: 999px;
  color: var(--ink-2);
  transition: background 220ms ease, color 220ms ease;
}
.nav-links a:hover { background: rgba(20,23,28,0.06); color: var(--ink); }
.nav-links a.active { color: var(--ink); }

.nav-ig {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  color: var(--ink-2);
  transition: color 200ms ease, background 200ms ease;
  padding: 0;
}
.nav-ig:hover { color: var(--ink); background: rgba(20,23,28,0.06); }
.nav-ig svg { width: 17px; height: 17px; }

.btn-login {
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.01em;
  padding: 9px 18px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  background: var(--ink);
  color: var(--bg);
  cursor: pointer;
  transition: transform 200ms ease, background 200ms ease, color 200ms ease;
}
.btn-login:hover {
  background: transparent;
  color: var(--ink);
}

/* ---------- Footer (subpages only) ---------- */
.footer {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 36px;
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.04em;
  z-index: 3;
  isolation: isolate;
}
.footer::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(
    to top,
    rgba(242,239,231,0.80) 0%,
    rgba(242,239,231,0.55) 60%,
    rgba(242,239,231,0.00) 100%
  );
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  mask-image: linear-gradient(to top, #000 0%, #000 60%, transparent 100%);
  -webkit-mask-image: linear-gradient(to top, #000 0%, #000 60%, transparent 100%);
  pointer-events: none;
}
.footer-links { display: flex; gap: 18px; flex-wrap: wrap; }
.footer-links a:hover { color: var(--ink); }

/* ---------- Modal ---------- */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(20,23,28,0.32);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  animation: fadeIn 280ms ease;
}
.modal-backdrop.open { display: flex; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal {
  width: 100%;
  max-width: 440px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 28px 26px 26px;
  position: relative;
  box-shadow: 0 30px 80px -20px rgba(20,23,28,0.30);
  animation: modalIn 360ms cubic-bezier(.2,.7,.2,1) both;
}
@keyframes modalIn {
  from { opacity: 0; transform: translateY(14px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.modal-close {
  position: absolute; top: 14px; right: 14px;
  width: 32px; height: 32px;
  border-radius: 999px;
  background: transparent;
  border: 1px solid var(--line);
  color: var(--ink-2);
  cursor: pointer;
  font-size: 16px;
  display: grid; place-items: center;
  transition: all 200ms ease;
}
.modal-close:hover { border-color: var(--ink); color: var(--ink); }
.modal .m-eyebrow {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  color: var(--sage-deep);
  text-transform: uppercase;
  margin-bottom: 12px;
}
.modal h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 34px;
  line-height: 1.05;
  letter-spacing: -0.01em;
  margin: 0 0 6px;
  color: var(--ink);
}
.modal h2 .it { font-style: italic; color: var(--sage-deep); }
.modal .m-lede {
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink-2);
  margin: 0 0 22px;
}
.modal .contact-row {
  display: flex; align-items: center; gap: 14px;
  padding: 16px 0;
  border-top: 1px solid var(--line);
}
.modal .contact-row:last-of-type { border-bottom: 1px solid var(--line); }
.modal .contact-row .icon {
  width: 38px; height: 38px;
  border-radius: 999px;
  background: rgba(107,138,134,0.16);
  color: var(--sage-deep);
  display: grid; place-items: center;
  flex-shrink: 0;
}
.modal .contact-row .icon svg { width: 16px; height: 16px; }
.modal .contact-row .col { flex: 1; min-width: 0; }
.modal .contact-row .lbl {
  font-family: var(--mono);
  font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 3px;
}
.modal .contact-row .val {
  font-size: 16px; color: var(--ink); word-break: break-word;
  display: block;
}
.modal .contact-row a.val:hover { color: var(--sage-deep); }
.modal .foot-note {
  margin-top: 18px;
  font-size: 12px; color: var(--muted); line-height: 1.5;
}

/* ---------- Mobile nav & shared ---------- */
@media (max-width: 720px) {
  .nav { padding: 10px 14px; gap: 6px; }
  .brand svg { height: 18px; }
  .nav-links { gap: 1px; }
  .nav-links a {
    padding: 7px 9px;
    font-size: 12px;
    letter-spacing: 0.005em;
  }
  .lang-toggle {
    padding: 6px 8px;
    font-size: 10px;
    min-width: 30px;
    letter-spacing: 0.06em;
  }
  .btn-login {
    padding: 7px 12px;
    font-size: 12px;
  }
  .footer { padding: 14px 16px 16px; font-size: 11px; flex-wrap: wrap; gap: 8px; }
  .footer-links { gap: 12px; }
  .sub-page { padding: 96px 18px 120px !important; }
  .modal { padding: 26px 20px 22px; border-radius: 18px; }
  .modal h2 { font-size: 28px; }
  .modal .contact-row .val { font-size: 15px; }
}
@media (max-width: 460px) {
  .nav { padding: 9px 12px; }
  .nav-links a { padding: 6px 7px; font-size: 11.5px; }
  .nav-links a[data-i18n="nav.support"] { display: none; }
  .lang-toggle { padding: 6px 7px; min-width: 28px; }
  .btn-login { padding: 7px 11px; font-size: 11.5px; }
}
@media (max-width: 380px) {
  .nav-links a[data-i18n="nav.about"] { display: none; }
}

/* ---------- Fluid background ---------- */
.fluid {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}
.fluid svg { width: 100%; height: 100%; display: block; }

/* On portrait phones the 16:9 viewBox crops blobs off-screen. Use mobile-specific anims. */
@media (max-width: 720px) {
  .blob-a { animation-name: drift-a-m; }
  .blob-b { animation-name: drift-b-m; }
  .blob-c { animation-name: drift-c-m; }
  .blob-d { animation-name: drift-d-m; }
}
@keyframes drift-a-m {
  0%,100% { transform: translate(-40px, 120px) scale(1); }
  50% { transform: translate(40px, 60px) scale(1.06); }
}
@keyframes drift-b-m {
  0%,100% { transform: translate(60px, 80px) scale(1); }
  50% { transform: translate(-20px, 140px) scale(1.10); }
}
@keyframes drift-c-m {
  0%,100% { transform: translate(-30px, -120px) scale(1); }
  50% { transform: translate(40px, -40px) scale(0.95); }
}
@keyframes drift-d-m {
  0%,100% { transform: translate(50px, -80px) scale(1); }
  50% { transform: translate(-40px, -140px) scale(1.06); }
}

/* ---------- Grain overlay ---------- */
.grain {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.5;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 0.06 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

/* ---------- Shared page container ---------- */
.page {
  position: relative;
  z-index: 2;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* type scale */
.eyebrow {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--muted);
  font-weight: 500;
}
.serif {
  font-family: var(--serif);
  font-weight: 400;
  letter-spacing: -0.01em;
  line-height: 0.98;
}

/* hairline divider */
.hr {
  height: 1px;
  background: var(--line);
  width: 100%;
}

/* utility */
.mono { font-family: var(--mono); font-size: 11px; letter-spacing: 0.04em; }

/* Fluid blobs */
.blob { transform-origin: center; will-change: transform; }
.blob-a { animation: drift-a 22s ease-in-out infinite; }
.blob-b { animation: drift-b 28s ease-in-out infinite; }
.blob-c { animation: drift-c 34s ease-in-out infinite; }
.blob-d { animation: drift-d 26s ease-in-out infinite; }
@keyframes drift-a {
  0%,100% { transform: translate(0,0) scale(1); }
  33% { transform: translate(80px, -60px) scale(1.08); }
  66% { transform: translate(-40px, 50px) scale(0.95); }
}
@keyframes drift-b {
  0%,100% { transform: translate(0,0) scale(1); }
  50% { transform: translate(-90px, 70px) scale(1.12); }
}
@keyframes drift-c {
  0%,100% { transform: translate(0,0) scale(1); }
  50% { transform: translate(60px, 90px) scale(0.92); }
}
@keyframes drift-d {
  0%,100% { transform: translate(0,0) scale(1); }
  50% { transform: translate(-70px, -80px) scale(1.05); }
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Subpage layout */
.sub-page {
  position: relative; z-index: 2;
  min-height: 100vh;
  display: flex; flex-direction: column;
  padding: 132px 64px 130px;
  max-width: 1280px; width: 100%; margin: 0 auto;
}
.sub-head {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 32px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 40px;
  animation: fadeUp 800ms cubic-bezier(.2,.7,.2,1) both;
}
.sub-head h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(54px, 7vw, 96px);
  line-height: 0.94;
  letter-spacing: -0.02em;
  margin: 0;
}
.sub-head h1 .it { font-style: italic; color: var(--sage-deep); }
.sub-head .lede {
  font-size: 16px;
  color: var(--ink-2);
  max-width: 360px;
  line-height: 1.5;
  text-align: right;
  margin-bottom: 12px;
}
@media (max-width: 820px) {
  .sub-page { padding: 110px 22px 80px; }
  .sub-head { grid-template-columns: 1fr; }
  .sub-head .lede { text-align: left; }
}
