/*
Theme Name: OdinCards
Theme URI: https://odincards.com
Author: OdinCards
Description: Landningssida för OdinCards: virtuella kort laddade med krypto, direkt i Telegram. En sida, mörkt tema, engelska och svenska. Telegram-användarnamnet anges under Utseende > Anpassa > OdinCards.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.8
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: odincards
*/

/* OdinCards – odincards.com
   Tokens are the app's own (see tokens.css in the brief). Dark theme only. */

:root {
  --deep:    #171a1c;
  --bg:      #1f2326;
  --surface: #2a3034;
  --raised:  #40464a;
  --line:    #3a4146;
  --ink:     #f3f6fb;
  --muted:   #b3bdc9;
  --jade:      #52d0c8;
  --jade-fill: #4fc5c0;
  --jade-ink:  #0d1113;
  --jade-hi:   #62e2d8;

  --radius:     14px;
  --radius-btn: 12px;
  --pill:       999px;

  --text: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;

  --gutter: 20px;
  --max: 1120px;
  --tilt: -10deg;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; background: var(--bg); color-scheme: dark; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.5 var(--text);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { display: block; max-width: 100%; height: auto; }

::selection { background: var(--jade); color: var(--jade-ink); }

a:focus-visible, button:focus-visible { outline: 2px solid var(--jade); outline-offset: 3px; border-radius: 6px; }

/* Language: both versions are in the HTML, the inactive one is hidden */
html:not([lang|="sv"]) [lang="sv"],
html[lang|="sv"] [lang="en"] { display: none; }

.skip {
  position: absolute; left: var(--gutter); top: -100px; z-index: 10;
  background: var(--jade-fill); color: var(--jade-ink);
  padding: 10px 14px; border-radius: var(--radius-btn); font-weight: 600; text-decoration: none;
}
.skip:focus { top: var(--gutter); }

/* Header */
.top {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  max-width: var(--max); margin: 0 auto;
  padding: 18px var(--gutter);
}
.brand img { height: 26px; width: auto; }

.lang {
  display: inline-flex; padding: 3px;
  border: 1px solid var(--line); background: var(--surface); border-radius: var(--pill);
}
.lang button {
  font: 500 0.85rem/1 var(--text); color: var(--muted);
  background: none; border: 0; border-radius: var(--pill);
  padding: 7px 12px; cursor: pointer;
  transition: color 0.15s, background-color 0.15s;
}
.lang button[aria-pressed="true"] { background: var(--raised); color: var(--ink); }
.lang button:focus-visible { outline-offset: 0; }

main { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }

/* Hero */
.hero {
  position: relative;
  margin: 0 calc(-1 * var(--gutter));
  padding: 28px var(--gutter) 48px;
  overflow: hidden;
}

.watermark {
  position: absolute; z-index: 0; pointer-events: none;
  width: 120%; right: -44%; top: -4%;
  opacity: 0.05;
  -webkit-mask-image: radial-gradient(closest-side, #000 45%, transparent 100%);
  mask-image: radial-gradient(closest-side, #000 45%, transparent 100%);
}

.hero-text { position: relative; z-index: 1; container-type: inline-size; }

.slogan {
  margin: 0;
  font: 800 clamp(2.15rem, 8.6vw, 4.4rem)/1.04 var(--text);
  text-transform: uppercase;
  letter-spacing: 0.01em;
}
.slogan b { display: block; color: var(--jade); font-weight: 800; }

.lead {
  margin: 18px 0 26px;
  max-width: 30em;
  color: var(--muted);
  font-size: clamp(1.05rem, 2.2vw, 1.25rem);
  line-height: 1.5;
}

.actions { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; margin: 0; }
.note { color: var(--muted); font-size: 0.9rem; }

.btn-primary {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--jade-fill); color: var(--jade-ink);
  border: 0; border-radius: var(--radius-btn);
  padding: 15px 22px;
  font-weight: 600; font-size: 1rem; line-height: 1; text-decoration: none;
  transition: background-color 0.15s, transform 0.15s;
}
.btn-primary:hover { background: var(--jade-hi); }
.btn-primary:active { transform: translateY(1px); }
.btn-primary .ic { width: 20px; height: 20px; fill: currentColor; flex: none; }

/* The card: the hero of the page */
.stage {
  position: relative; z-index: 1;
  margin: 40px 0 0 14%;
  width: 96%;
  max-width: 560px;
}
.stage::before {
  content: "";
  position: absolute; inset: -30% -10%;
  background: radial-gradient(closest-side, rgba(82, 208, 200, 0.26), rgba(82, 208, 200, 0) 72%);
  filter: blur(14px);
  pointer-events: none;
  animation: bloom 1.6s ease-out both;
}
.card {
  position: relative;
  aspect-ratio: 856 / 540;
  border-radius: 6.3% / 10%;
  overflow: hidden;
  transform: rotate(var(--tilt));
  box-shadow:
    0 34px 70px -22px rgba(0, 0, 0, 0.75),
    0 10px 24px -10px rgba(0, 0, 0, 0.6);
  animation: settle 1.1s cubic-bezier(0.2, 0.7, 0.2, 1) both;
  will-change: transform;
}
.card img { width: 100%; height: 100%; }
.reflex {
  position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(112deg,
    rgba(255, 255, 255, 0) 36%,
    rgba(255, 255, 255, 0.075) 47%,
    rgba(255, 255, 255, 0.02) 55%,
    rgba(255, 255, 255, 0) 64%);
}

@keyframes settle {
  from { opacity: 0; transform: translateY(30px) rotate(calc(var(--tilt) - 5deg)); }
}
@keyframes bloom {
  from { opacity: 0; }
}

/* Section title with the app's jade bar */
.sec-title {
  position: relative;
  margin: 0 0 26px;
  padding-left: 16px;
  font: 700 clamp(1.5rem, 3vw, 2rem)/1.15 var(--text);
  letter-spacing: -0.01em;
}
.sec-title::before {
  content: ""; position: absolute; left: 0; top: 0.1em; bottom: 0.1em;
  width: 4px; border-radius: 2px; background: var(--jade);
}

/* How it works: a real sequence, so the steps are numbered */
.how { padding: 48px 0 24px; }
.steps {
  list-style: none; margin: 0; padding: 0;
  counter-reset: step;
  display: grid; gap: 14px;
}
.steps li {
  position: relative;
  counter-increment: step;
  padding: 18px 18px 18px 66px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.steps li::before {
  content: counter(step);
  position: absolute; left: 18px; top: 17px;
  width: 32px; height: 32px;
  display: grid; place-items: center;
  border: 1.5px solid var(--jade); border-radius: 50%;
  color: var(--jade); font-weight: 700; font-size: 0.95rem;
  font-variant-numeric: tabular-nums;
}
.steps h3 { margin: 0 0 5px; font-size: 1.08rem; font-weight: 600; line-height: 1.3; }
.steps p { margin: 0; color: var(--muted); font-size: 0.97rem; line-height: 1.5; max-width: 34em; }

/* The app: screenshots in quiet phone frames */
.app { padding: 48px 0 24px; }
.phones {
  list-style: none;
  display: flex; gap: 16px;
  margin: 0 calc(-1 * var(--gutter));
  padding: 4px var(--gutter) 14px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: var(--gutter);
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.phones::-webkit-scrollbar { display: none; }
.phones li { flex: 0 0 min(68vw, 280px); scroll-snap-align: start; }
.phones figure { margin: 0; }
.phone {
  padding: 9px;
  background: var(--deep);
  border: 1px solid var(--line);
  border-radius: 30px;
  box-shadow: 0 24px 48px -28px rgba(0, 0, 0, 0.8);
}
.phone img { width: 100%; border-radius: 22px; }
.phones figcaption { margin: 12px 6px 0; color: var(--muted); font-size: 0.9rem; }

/* Invitation */
.invite { padding: 48px 0 72px; }
.panel {
  position: relative; overflow: hidden;
  max-width: 720px; margin: 0 auto;
  padding: 36px 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.panel .emblem {
  position: absolute; right: -40px; top: -30px;
  width: 220px; opacity: 0.07; pointer-events: none;
}
.panel h2 {
  position: relative;
  margin: 0 0 10px;
  font: 800 clamp(1.6rem, 3.4vw, 2.2rem)/1.1 var(--text);
  letter-spacing: -0.01em;
}
.panel p { position: relative; margin: 0 0 24px; max-width: 32em; color: var(--muted); font-size: 1.05rem; }
.panel .btn-primary { position: relative; }

/* Footer */
.foot {
  background: var(--deep);
  border-top: 1px solid var(--line);
  padding: 32px max(var(--gutter), calc((100% - var(--max)) / 2 + var(--gutter)));
  padding-bottom: calc(32px + env(safe-area-inset-bottom));
  display: grid; gap: 16px; justify-items: start; align-items: center;
}
.foot img { height: 22px; width: auto; }
.foot nav { display: flex; gap: 22px; }
.foot nav a { color: var(--jade); text-decoration: none; font-weight: 500; }
.foot nav a:hover { color: var(--jade-hi); text-decoration: underline; text-underline-offset: 3px; }
.foot p { margin: 0; color: var(--muted); font-size: 0.9rem; }

/* Wider screens */
@media (min-width: 860px) {
  :root { --gutter: 32px; --tilt: -8deg; }

  .top { padding-top: 24px; padding-bottom: 24px; }
  .brand img { height: 30px; }

  .hero {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
    align-items: center;
    gap: 40px;
    min-height: min(70vh, 620px);
    padding-top: 24px; padding-bottom: 56px;
  }
  .watermark { width: 60%; right: -8%; top: -12%; }
  .hero-text { max-width: 36rem; }
  /* Two lines, sized to the column so the jade line never wraps */
  .slogan { font-size: clamp(2.4rem, 8.2cqw, 4rem); }
  .lead { margin-top: 22px; }

  .stage { margin: 0; width: 100%; max-width: none; padding: 6% 2% 6% 4%; }
  .stage::before { inset: -14% 0; }

  .how { padding-top: 24px; }
  .steps { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
  .steps li { padding: 68px 20px 22px; }
  .steps li::before { left: 20px; top: 20px; }

  .phones {
    margin: 0; padding: 8px 0 0;
    display: grid; grid-template-columns: repeat(3, minmax(0, 300px));
    justify-content: center; gap: 32px;
    overflow: visible;
  }
  .phones li { flex: none; }
  .phones li:nth-child(2) { transform: translateY(-20px); }

  .invite { padding: 64px 0 96px; }
  .panel { padding: 48px; }
  .panel .emblem { width: 300px; right: -50px; top: -60px; }

  .foot { grid-template-columns: auto 1fr auto; gap: 32px; }
  .foot nav { justify-self: center; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .card, .stage::before { animation: none; }
  .card { will-change: auto; }
}
