/* Pack Trail — shared foundation: tokens, type, buttons, navigation, motion helpers */

:root {
  --ground: #ffffff;
  --ground-2: #f2f4f1;
  --ground-3: #e4e8e3;
  --ink: #0d1a15;
  --ink-2: #4a5752;
  --ink-3: #b9c1bc;
  --accent: #0a66ff;
  --accent-press: #0052d6;
  --accent-soft: #e3ebff;
  --accent-ink: #ffffff;
  --kraft: #d9bb8c;
  --kraft-2: #c9a36c;
  --kraft-3: #b88c52;
  --deep: #0f2a21;
  --mint: #9ff0c4;
  --danger: #b42318;

  --r-pill: 999px;
  --gutter: clamp(16px, 3vw, 32px);
  --max: 1320px;
  --nav-h: 76px;
  --ease: cubic-bezier(.2, .7, .1, 1);
  --spring: cubic-bezier(.3, 1.5, .5, 1);
  --f: "Geist", system-ui, -apple-system, "Segoe UI", sans-serif;
}

/* reset */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--ground);
  color: var(--ink);
  font-family: var(--f);
  font-size: 18px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; }
img, svg { display: block; max-width: 100%; }
button, input { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
::selection { background: var(--mint); color: var(--deep); }
section[id] { scroll-margin-top: var(--nav-h); }

[hidden] { display: none !important; }

.sr {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }

/* type */
h1, h2, h3 { font-weight: 600; letter-spacing: -.035em; line-height: 1; }
h2 { font-size: clamp(36px, 5.2vw, 76px); }
h3 { font-size: clamp(21px, 1.9vw, 26px); letter-spacing: -.02em; line-height: 1.15; }
.lead { font-size: clamp(19px, 1.6vw, 23px); line-height: 1.45; max-width: 36ch; }

/* buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  height: 52px; padding: 0 26px; border: 0; border-radius: var(--r-pill);
  font: 600 17px/1 var(--f); text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: transform .2s var(--ease), background-color .2s, color .2s;
}
.btn:active { transform: scale(.96); }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: var(--accent-press); }
.btn-quiet { background: var(--ground-2); color: var(--ink); }
.btn-quiet:hover { background: var(--ground-3); }
.btn[disabled] { background: var(--ground-3); color: var(--ink-2); cursor: not-allowed; transform: none; }
.btn .arr { transition: transform .25s var(--ease); }
.btn:hover .arr { transform: translateX(4px); }

/* form fields */
.input {
  width: 100%; height: 52px; padding: 0 16px;
  border: 2px solid transparent; border-radius: 14px; background-color: var(--ground-2);
  font-size: 17px; transition: border-color .2s, background-color .2s;
}
.input:hover { background-color: var(--ground-3); }
.input:focus { outline: none; border-color: var(--accent); background-color: var(--ground); }
.input::placeholder { color: var(--ink-2); opacity: .7; }
select.input {
  appearance: none; padding-right: 44px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%230d1a15' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 16px center;
}

/* navigation */
.nav { position: sticky; top: 0; z-index: 50; background: var(--ground); }
.nav > .wrap { display: flex; align-items: center; gap: 24px; height: var(--nav-h); }
.mark { display: flex; align-items: center; flex: none; padding: 8px 0; text-decoration: none; }
.mark .logo { flex: none; max-width: none; height: 30px; }
.mark:hover .pt-dot { transform: translate(1.5px, -1.5px) scale(1.18); }
/* the trail draws itself into the box, then the dot lands */
.js .mark .pt-path { animation: pt-draw 1.2s var(--ease) .15s backwards; }
.js .mark .pt-dot { animation: pt-pop .55s var(--spring) 1.15s backwards; }
.nav-links { display: flex; gap: 4px; margin-left: 16px; }
.nav-links a {
  padding: 9px 14px; border-radius: var(--r-pill);
  font-weight: 500; font-size: 16px; color: var(--ink-2); text-decoration: none;
  transition: color .2s, background-color .2s;
}
.nav-links a:hover { color: var(--ink); }
.nav-links a.is-active { color: var(--ink); background: var(--ground-2); }
.nav-act { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.nav-act .login, .nav-act .lang {
  display: inline-flex; align-items: center; height: 44px; padding: 0 16px;
  border-radius: var(--r-pill); font-weight: 500; font-size: 16px; text-decoration: none;
  transition: background-color .2s;
}
.nav-act .login:hover, .nav-act .lang:hover { background: var(--ground-2); }
.nav-act .lang { padding: 0 12px; color: var(--ink-2); }
.nav-act .lang:hover { color: var(--ink); }
.nav-act .btn { height: 44px; padding: 0 20px; font-size: 16px; }

.burger {
  display: none; width: 44px; height: 44px; border: 0; border-radius: 50%;
  background: var(--ground-2); cursor: pointer; place-content: center; gap: 5px;
}
.burger span {
  display: block; width: 18px; height: 2.5px; border-radius: 2px; background: var(--ink);
  transition: transform .3s var(--ease);
}
.burger[aria-expanded="true"] span:first-child { transform: translateY(3.75px) rotate(45deg); }
.burger[aria-expanded="true"] span:last-child { transform: translateY(-3.75px) rotate(-45deg); }

.menu {
  display: none; position: fixed; top: var(--nav-h); left: 0; right: 0; bottom: 0;
  background: var(--ground); padding: 16px var(--gutter) 40px;
  opacity: 0; visibility: hidden; transform: translateY(-8px);
  transition: opacity .25s, transform .35s var(--ease), visibility 0s .35s;
}
.menu.open { opacity: 1; visibility: visible; transform: none; transition: opacity .25s, transform .35s var(--ease); }
.menu nav { display: grid; gap: 4px; }
.menu nav a {
  font-size: 32px; font-weight: 600; letter-spacing: -.03em; text-decoration: none;
  padding: 10px 0; color: var(--ink-2);
}
.menu nav a.is-active { color: var(--ink); }
.menu .btn { margin-top: 24px; width: 100%; }
.menu .menu-lang { display: block; margin-top: 12px; padding: 12px; text-align: center; font-weight: 500; color: var(--ink-2); text-decoration: none; }

@media (max-width: 900px) {
  .nav-links, .nav-act .login, .nav-act .lang { display: none; }
  .burger { display: grid; }
  .menu { display: block; }
  body.menu-open { overflow: hidden; }
}
@media (max-width: 420px) {
  .mark .logo { height: 24px; }
  .nav-act .btn { padding: 0 16px; }
}
/* very small phones: the symbol alone */
@media (max-width: 360px) {
  .nav > .wrap { gap: 12px; }
  .mark { width: 23px; overflow: hidden; }
}
/* phones in landscape: a lower bar leaves more room for the page */
@media (max-height: 500px) {
  :root { --nav-h: 60px; }
}
/* very wide screens: a wider column */
@media (min-width: 1800px) {
  :root { --max: 1560px; }
}
@media (hover: none) {
  .mark:hover .pt-dot { transform: none; }
}

/* logo: the open box (the trail) and the dot.
   Colour follows `color`; the dot follows --pt-dot. */
.logo { display: block; width: auto; overflow: visible; color: var(--ink); --pt-dot: var(--accent); }
.logo .pt-path { fill: none; stroke: currentColor; stroke-width: 8; stroke-linecap: round; stroke-dasharray: 1; }
.logo .pt-dot { fill: var(--pt-dot); transform-box: fill-box; transform-origin: center; transition: transform .45s var(--spring); }
@keyframes pt-draw { from { stroke-dashoffset: 1; } }
@keyframes pt-pop { from { transform: scale(0); } }

/* scroll reveal: content is visible without script */
.js .rv { opacity: 0; transform: translateY(24px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.js .rv.in { opacity: 1; transform: none; }

@keyframes pop { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

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

/* contact dialog */
.contact { position: fixed; inset: 0; margin: auto; height: fit-content; max-height: calc(100% - 32px); overflow: auto; width: min(480px, calc(100% - 32px)); padding: 40px 36px 32px; border: 0; border-radius: 20px; background: #fff; color: var(--ink); box-shadow: 0 30px 80px rgba(13,26,21,.25); }
.contact::backdrop { background: rgba(13,26,21,.45); backdrop-filter: blur(4px); }
.contact[open] { animation: contact-in .28s cubic-bezier(.2,.8,.2,1); }
@keyframes contact-in { from { opacity: 0; transform: translateY(12px) scale(.97); } }
.contact h2 { margin: 0 0 12px; font-size: 26px; line-height: 1.2; }
.contact p { margin: 0 0 20px; opacity: .75; line-height: 1.55; }
.contact-mail { display: inline-block; font-size: 20px; font-weight: 600; color: var(--accent); text-decoration: none; }
.contact-mail:hover { text-decoration: underline; }
.contact address { margin: 8px 0 28px; font-style: normal; font-size: 14px; opacity: .6; }
.contact-acts { display: flex; flex-wrap: wrap; gap: 12px; }
.contact-x { position: absolute; top: 14px; right: 16px; width: 36px; height: 36px; border: 0; border-radius: 50%; background: transparent; font-size: 24px; cursor: pointer; color: inherit; }
.contact-x:hover { background: rgba(13,26,21,.06); }
