/* =========================================================
   VIVICTA — Support Tools & Downloads
   "Forest & Snow" — a Nordic tech portal
   ========================================================= */

:root {
  /* palette */
  --pine:      #0e4a38;
  --pine-deep: #0a3728;
  --pine-ink:  #082a1f;
  --sap:       #2fa46b;   /* fresh accent */
  --sap-soft:  #e3f2e9;
  --frost:     #f3f7f3;   /* page field */
  --snow:      #ffffff;   /* tiles */
  --ink:       #142019;
  --muted:     #5c6e64;
  --muted-2:   #7f9188;
  --line:      #dde7e0;
  --line-soft: #eaf1ec;

  /* type */
  --display: "Space Grotesk", system-ui, sans-serif;
  --body:    "Hanken Grotesk", system-ui, sans-serif;
  --mono:    "JetBrains Mono", ui-monospace, monospace;

  --radius:  16px;
  --radius-sm: 11px;
  --shadow:  0 1px 2px rgba(10,55,40,.05), 0 12px 30px -18px rgba(10,55,40,.28);
  --shadow-lift: 0 2px 4px rgba(10,55,40,.06), 0 26px 46px -22px rgba(10,55,40,.36);

  --shell: 1200px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  font-family: var(--body);
  color: var(--ink);
  background: var(--frost);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.shell {
  width: min(100% - 44px, var(--shell));
  margin-inline: auto;
}

a { color: inherit; }

/* =========================================================
   HERO
   ========================================================= */
.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  color: #eaf5ee;
  background:
    radial-gradient(120% 90% at 82% -10%, rgba(47,164,107,.30), transparent 55%),
    linear-gradient(168deg, var(--pine) 0%, var(--pine-deep) 62%, var(--pine-ink) 100%);
  padding-bottom: 92px;
}

.hero__grid {
  display: grid;
  grid-template-columns: 1fr minmax(220px, 360px);
  align-items: center;
  gap: 48px;
  padding-top: clamp(30px, 4vw, 58px);
  padding-bottom: clamp(6px, 2vw, 20px);
}

.hero__art {
  justify-self: end;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero__art img {
  width: clamp(220px, 24vw, 340px);
  height: auto;
  opacity: .13;
  transform: rotate(-6deg);
  user-select: none;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 26px 0 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}
.brand__logo {
  height: 30px;
  width: auto;
  display: block;
}

.trust {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: .01em;
  color: #bfe2cd;
  padding: 8px 14px;
  border: 1px solid rgba(191,226,205,.28);
  border-radius: 999px;
  background: rgba(255,255,255,.04);
  white-space: nowrap;
}
.trust__ico { width: 16px; height: 16px; color: var(--sap); }

.hero__copy { max-width: 620px; }

.eyebrow {
  margin: 0 0 18px;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: var(--sap);
}

.hero__title {
  margin: 0;
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(42px, 8.2vw, 74px);
  line-height: .98;
  letter-spacing: -.03em;
  color: #fff;
}
.hero__title span { color: #a6d8bd; }

.hero__lede {
  margin: 26px 0 0;
  max-width: 500px;
  font-size: clamp(15px, 2vw, 17.5px);
  color: #c4ddce;
  line-height: 1.6;
}

/* seam that lets the tiles overlap the band */
.hero__seam {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 92px;
  background: var(--frost);
  border-top-left-radius: 30px;
  border-top-right-radius: 30px;
}

/* =========================================================
   DOWNLOADS
   ========================================================= */
.downloads {
  position: relative;
  z-index: 2;
  margin-top: -78px;
  padding-bottom: 56px;
  flex: 1 0 auto;
}

.downloads__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin: 0 4px 18px;
}
.downloads__label {
  margin: 0;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--muted);
}
.downloads__count {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted-2);
}

.grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}

/* ---- tile ---- */
.tile {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 24px 24px 22px;
  background: var(--snow);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  text-decoration: none;
  color: inherit;
  overflow: hidden;
  transition: transform .28s cubic-bezier(.2,.7,.2,1),
              box-shadow .28s ease,
              border-color .28s ease;
}
/* left accent rail */
.tile::before {
  content: "";
  position: absolute;
  left: 0; top: 22px; bottom: 22px;
  width: 3px;
  border-radius: 3px;
  background: var(--line);
  transition: background .28s ease, top .28s ease, bottom .28s ease;
}
.tile:hover,
.tile:focus-visible {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lift);
  border-color: #c2d6c9;
  outline: none;
}
.tile:hover::before,
.tile:focus-visible::before { background: var(--sap); top: 16px; bottom: 16px; }
.tile:focus-visible { box-shadow: var(--shadow-lift), 0 0 0 3px rgba(47,164,107,.35); }

.tile__top {
  display: flex;
  align-items: flex-start;
}

.tile__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.tile__icon {
  flex: none;
  width: 46px; height: 46px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: var(--pine);
  background: var(--sap-soft);
  border: 1px solid #d3e8db;
  transition: background .28s ease, color .28s ease, border-color .28s ease;
}
.tile__icon svg { width: 23px; height: 23px; }
.tile:hover .tile__icon,
.tile:focus-visible .tile__icon {
  background: var(--pine);
  color: #eaf5ee;
  border-color: var(--pine);
}

.tile__spec {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .06em;
  color: var(--muted);
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  white-space: nowrap;
  background: #fbfdfb;
}

.tile__body { flex: 1; }
.tile__name {
  margin: 0 0 5px;
  font-family: var(--display);
  font-weight: 600;
  font-size: 19px;
  letter-spacing: -.015em;
  color: var(--ink);
}
.tile__desc {
  margin: 0;
  font-size: 14px;
  color: var(--muted);
  line-height: 1.5;
}

.tile__action {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--display);
  font-weight: 600;
  font-size: 14px;
  color: var(--pine);
  letter-spacing: -.005em;
}
.tile__action .arrow {
  display: grid; place-items: center;
  width: 26px; height: 26px;
  border-radius: 999px;
  background: var(--sap-soft);
  border: 1px solid #d3e8db;
  transition: transform .28s cubic-bezier(.2,.7,.2,1), background .28s ease, border-color .28s ease;
}
.tile__action .arrow svg { width: 14px; height: 14px; }
.tile:hover .tile__action .arrow,
.tile:focus-visible .tile__action .arrow {
  transform: translateY(2px);
  background: var(--pine);
  border-color: var(--pine);
  color: #eaf5ee;
}

/* recommended-for-your-device state */
.tile--rec { border-color: var(--sap); }
.tile--rec::before { background: var(--sap); top: 16px; bottom: 16px; }
.tile__rec {
  position: absolute;
  top: 0; right: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: #fff;
  background: var(--sap);
  padding: 6px 12px 6px 11px;
  border-bottom-left-radius: 12px;
}
.tile__rec svg { width: 12px; height: 12px; }

/* helpline */
.helpline {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: center;
  margin: 30px auto 0;
  padding: 15px 22px;
  max-width: max-content;
  font-size: 14px;
  color: var(--muted);
  background: var(--snow);
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  text-align: center;
}
.helpline__ico { width: 17px; height: 17px; color: var(--muted-2); flex: none; }
.helpline__link {
  color: var(--pine);
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1.5px solid rgba(47,164,107,.4);
  transition: border-color .2s ease;
}
.helpline__link:hover { border-color: var(--sap); }

/* =========================================================
   FOOTER
   ========================================================= */
.footer {
  flex-shrink: 0;
  background: linear-gradient(120deg, var(--pine-deep), var(--pine-ink));
  color: #bfe2cd;
}
.footer__inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 30px 0;
  text-align: center;
}
.footer__flake { width: 24px; height: auto; flex: none; }
.footer__line {
  margin: 0;
  font-size: 14.5px;
  letter-spacing: .005em;
}

/* =========================================================
   ENTRANCE MOTION
   ========================================================= */
@media (prefers-reduced-motion: no-preference) {
  .reveal { opacity: 0; transform: translateY(16px); }
  .reveal.in {
    opacity: 1; transform: none;
    transition: opacity .6s ease, transform .6s cubic-bezier(.2,.7,.2,1);
  }
  .hero__copy > * { opacity: 0; transform: translateY(14px); animation: rise .7s cubic-bezier(.2,.7,.2,1) forwards; }
  .eyebrow     { animation-delay: .05s; }
  .hero__title { animation-delay: .13s; }
  .hero__lede  { animation-delay: .23s; }
  @keyframes rise { to { opacity: 1; transform: none; } }
}

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 900px) {
  .hero__grid { grid-template-columns: 1fr; gap: 0; }
  .hero__art { display: none; }
}

@media (max-width: 720px) {
  .grid { grid-template-columns: 1fr; gap: 14px; }
  .hero { padding-bottom: 80px; }
  .hero__seam { height: 80px; }
  .downloads { margin-top: -66px; }
  .trust { display: none; }
  .helpline { max-width: 100%; border-radius: 14px; justify-content: flex-start; text-align: left; }
  .footer__inner { flex-direction: column; gap: 12px; }
}

@media (max-width: 420px) {
  .shell { width: min(100% - 32px, var(--shell)); }
  .tile__spec { display: none; }
  .brand__word { font-size: 24px; }
}
