/* Energetify × Rahimly — shared: tokens, dark mode, marks, nav, sections, buttons, footer */
:root {
  --ground: #fbfbfd;
  --surface: #f2f2f5;
  --ink: #16171b;
  --muted: #62656f;
  --hair: #e2e3e9;
  --mark: #111114;
  --mark-rgb: 17, 17, 20;
  --bolt: url("/assets/img/bolt.png");
  --display: "Google Sans", "Product Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --body: "Google Sans", "Product Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --gutter: clamp(16px, 5vw, 56px);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) body:not([data-mode="light"]) {
    --ground: #07080a;
    --surface: #0f1114;
    --ink: #eef0ea;
    --muted: #8f958a;
    --hair: #1f2226;
    --mark: #f4f5f0;
    --mark-rgb: 244, 245, 240;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] body:not([data-mode="light"]), body[data-mode="dark"] {
  --ground: #07080a;
  --surface: #0f1114;
  --ink: #eef0ea;
  --muted: #8f958a;
  --hair: #1f2226;
  --mark: #f4f5f0;
  --mark-rgb: 244, 245, 240;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  background: var(--ground);
  color: var(--ink);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
::selection { background: var(--ink); color: var(--ground); }
a { color: inherit; }
.mk { display: inline-block; flex: none; background: var(--mark);
  -webkit-mask: var(--bolt) center / contain no-repeat; mask: var(--bolt) center / contain no-repeat; }

#field { position: fixed; inset: 0; width: 100%; height: 100%; display: block; z-index: 0; }
#fx { position: fixed; inset: 0; width: 100%; height: 100%; display: block; z-index: 9; pointer-events: none; }
body { touch-action: manipulation; }
[hidden] { display: none !important; }

@keyframes rise { 0% { opacity: .45; transform: translateY(18px); } 100% { opacity: 1; transform: none; } }
.label .mk.spin { animation: spin .7s cubic-bezier(.2,1.3,.4,1); }
@keyframes spin { 0% { transform: rotate(-180deg) scale(.4); } 100% { transform: none; } }
@media (prefers-reduced-motion: reduce) { .rise, h2.lit, .label .mk.spin { animation: none; } }
@keyframes lit { 0% { opacity: .35; letter-spacing: -0.01em; } 100% { opacity: 1; } }
.brand .mk.charged { animation: charged .5s ease; }
@keyframes charged { 40% { transform: scale(1.6) rotate(-8deg); } }

/* ---------- Nav ---------- */
.nav {
  position: fixed; z-index: 10; left: 0; right: 0; top: 0;
  padding: calc(14px + env(safe-area-inset-top, 0px)) var(--gutter) 14px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  transition: background .3s, border-color .3s;
  border-bottom: 1px solid transparent;
}
.nav.solid {
  background: color-mix(in srgb, var(--ground) 96%, transparent);
  border-bottom-color: var(--hair);
}
.brand { display: inline-flex; align-items: center; gap: 0; text-decoration: none;
  font-family: var(--display); font-weight: 500; font-size: 18px; letter-spacing: -0.02em; white-space: nowrap; }
.brand .mk { width: 11px; height: 19px; margin-right: 10px; }
.brand .full { display: inline-flex; align-items: center; gap: .4em; margin-left: .4em; }
.brand .x { color: var(--muted); font-weight: 400; }
.links { display: flex; gap: 28px; font-size: 14px; }
.links a { text-decoration: none; color: var(--muted); transition: color .2s; }
.links a:hover { color: var(--ink); }
.tools { display: flex; align-items: center; gap: 10px; }
.seg { display: inline-flex; border: 1px solid var(--hair); border-radius: 999px; padding: 3px; background: var(--ground); }
.seg button {
  font: 500 12px/1 var(--body); letter-spacing: .04em; color: var(--muted);
  background: none; border: 0; padding: 7px 9px; border-radius: 999px; cursor: pointer;
}
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--ground); }
.mode {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; width: 8.6em;   /* fixed width: switching language never moves the header */
  padding: 8px 13px; border-radius: 999px;
  border: 1px solid var(--hair); background: var(--ground); color: var(--ink);
  font: 400 14px/1 var(--body); cursor: pointer;
}
.mode .mk { width: 7px; height: 12px; }
.mode:hover, .seg:hover { border-color: var(--muted); }
button:focus-visible, a:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
@media (max-width: 860px) { .links { display: none; } }
@media (max-width: 420px) { .brand .full { display: none; } .mode .lbl { display: none; } .mode { width: auto; } }

/* ---------- Sections ---------- */
section.block {
  position: relative; z-index: 1;
  background: var(--ground);
  padding-inline: var(--gutter);
  padding-block: clamp(72px, 11vw, 140px);
  border-top: 1px solid var(--hair);
}
.wrap { max-width: 1120px; margin: 0 auto; }
.label {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 12px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--muted);
}
.label .mk { width: 7px; height: 12px; }
h2 {
  margin: 18px 0 0;
  font-family: var(--display); font-weight: 400;
  font-size: clamp(32px, 5vw, 60px); line-height: 1.05; letter-spacing: -0.04em;
  text-wrap: balance; max-width: 22ch;
}
h3 { margin: 0; font-family: var(--display); font-weight: 500; font-size: 22px; letter-spacing: -0.02em; line-height: 1.2; }
p { margin: 0; }

/* nothing on the site is selectable/copyable except the contact details */
body { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; -webkit-tap-highlight-color: transparent; }
.row .v, input, textarea { -webkit-user-select: text; user-select: text; -webkit-touch-callout: default; }
.row .v { user-select: all; -webkit-user-select: all; }
img, svg, canvas { -webkit-user-drag: none; }
.vortex, .vortex:focus { outline: none; -webkit-tap-highlight-color: transparent; }
button.vortex:focus-visible { outline: none; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 44px; padding: 0 20px; border-radius: 999px;
  border: 1px solid var(--ink); background: var(--ink); color: var(--ground);
  font: 400 16px/1 var(--body); letter-spacing: 0; cursor: pointer; text-decoration: none;
  transition: transform .2s, background .2s, border-color .2s;
}
.btn:hover { transform: translateY(-1px); }
.btn .mk { width: 9px; height: 16px; background: currentColor; }
.btn.ghost { background: var(--surface); color: var(--ink); border-color: var(--hair); }
.btn.ghost:hover { border-color: var(--muted); }
.btn.lg { min-height: 56px; padding: 0 28px; font-size: 18px; }
.actions { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; margin-top: 10px; pointer-events: auto; }



/* ---------- Pages: page transitions, skip link, language flash guard ---------- */
.lang-pending main, .lang-pending .links, .lang-pending .menu, .lang-pending .foot { visibility: hidden; }
.skip { position: fixed; z-index: 100; left: 12px; top: -60px; padding: 10px 16px; border-radius: 999px; background: var(--ink); color: var(--ground); text-decoration: none; font-size: 14px; }
.skip:focus { top: calc(10px + env(safe-area-inset-top, 0px)); }

/* ---------- Nav: real links, current page, phone menu ---------- */
.nav { display: grid; grid-template-columns: auto 1fr auto; }
.links { justify-self: center; }
.links a { position: relative; padding: 6px 2px; }
.links a[aria-current="page"] { color: var(--ink); }
.links a[aria-current="page"]::after { content: ""; position: absolute; left: 50%; bottom: -2px; width: 5px; height: 9px; transform: translateX(-50%); background: var(--mark);
  -webkit-mask: var(--bolt) center / contain no-repeat; mask: var(--bolt) center / contain no-repeat; }
.brand { justify-self: start; }
.tools { justify-self: end; }
.menu-btn { display: none; position: relative; width: 40px; height: 40px; flex: none; border-radius: 999px; border: 1px solid var(--hair); background: var(--ground); color: var(--ink); cursor: pointer; }
.menu-btn span { position: absolute; left: 12px; right: 12px; height: 1.6px; border-radius: 2px; background: currentColor; transition: transform .3s cubic-bezier(.2,.8,.2,1), top .3s; }
.menu-btn span:first-child { top: 15px; } .menu-btn span:last-child { top: 22px; }
.nav.open .menu-btn span:first-child { top: 18.5px; transform: rotate(45deg); } .nav.open .menu-btn span:last-child { top: 18.5px; transform: rotate(-45deg); }
.menu-btn:hover { border-color: var(--muted); }
.menu { position: fixed; z-index: 9; inset: 0; padding: calc(84px + env(safe-area-inset-top, 0px)) var(--gutter) calc(28px + env(safe-area-inset-bottom, 0px));
  background: var(--ground); overflow-y: auto; overscroll-behavior: contain; }
.menu-in { display: grid; gap: 4px; max-width: 520px; margin: 0 auto; }
.menu a { display: flex; align-items: center; gap: 16px; padding: 14px 6px; border-bottom: 1px solid var(--hair); text-decoration: none;
  font-family: var(--display); font-size: clamp(28px, 8vw, 40px); letter-spacing: -.035em; line-height: 1.1; color: var(--ink); }
.menu a .ni { width: 26px; height: 26px; flex: none; color: var(--muted); }
.menu a[aria-current="page"] .ni { color: var(--ink); }
.menu a[aria-current="page"]::after { content: ""; width: 8px; height: 14px; margin-left: auto; background: var(--mark); -webkit-mask: var(--bolt) center / contain no-repeat; mask: var(--bolt) center / contain no-repeat; }
.menu-more { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; margin-top: 14px; }
.menu-more a { font-size: 19px; letter-spacing: -.01em; gap: 10px; border-bottom: 0; color: var(--muted); }
.menu-more a .ni { width: 20px; height: 20px; }
body.menu-open { overflow: hidden; }
@media (max-width: 860px) { .menu-btn { display: inline-block; } .nav { grid-template-columns: 1fr auto; } }
@media (min-width: 861px) { .menu { display: none !important; } }

/* ---------- Page head (every page except home) ---------- */
.page-head { border-top: 0; padding-top: calc(clamp(120px, 16vw, 200px) + env(safe-area-inset-top, 0px)); padding-bottom: clamp(40px, 6vw, 72px); }
.ph-title { margin: 18px 0 0; font-family: var(--display); font-weight: 400; font-size: clamp(44px, 8vw, 104px); line-height: 1; letter-spacing: -.05em; max-width: 16ch; text-wrap: balance; }
.ph-lede { margin-top: 22px; max-width: 34rem; color: var(--muted); font-size: clamp(17px, 2vw, 20px); text-wrap: pretty; }
section.block.tight { padding-top: 0; border-top: 0; }

/* ---------- Footer ---------- */
.foot { position: relative; z-index: 1; background: var(--ground); border-top: 1px solid var(--hair);
  padding: 34px var(--gutter) calc(28px + env(safe-area-inset-bottom, 0px)); display: grid; gap: 22px; font-size: 14px; color: var(--muted); }
.foot-row { display: flex; justify-content: space-between; align-items: center; gap: 16px 28px; flex-wrap: wrap; max-width: 1120px; width: 100%; margin: 0 auto; }
.foot-row.small { font-size: 13px; }
.foot-brand { font-size: 16px; color: var(--ink); gap: .35em; }
.foot-brand .mk { margin-right: 6px; }
.foot-links { display: flex; gap: 8px 22px; flex-wrap: wrap; }
.foot a { color: inherit; text-decoration: none; }
.foot a:hover, .foot a[aria-current="page"] { color: var(--ink); }
.foot .secret { opacity: .7; }
.page-head .wrap > * { animation: rise .8s cubic-bezier(.2,.8,.2,1) both; }
.page-head .wrap > :nth-child(2) { animation-delay: .06s; } .page-head .wrap > :nth-child(3) { animation-delay: .12s; } .page-head .wrap > :nth-child(4) { animation-delay: .18s; }
@media (prefers-reduced-motion: reduce) { .page-head .wrap > * { animation: none; } }
.sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
