/* ==========================================================================
   JIM ($JIM) — main stylesheet

   1. Design tokens
   2. Reset & base
   3. Layout primitives
   4. Components
   5. Sections
   6. Responsive
   ========================================================================== */

/* 1. Design tokens
   ========================================================================== */

:root {
  /* Surfaces */
  --color-bg: #0b0b0a;
  --color-surface: #141310;
  --color-surface-raised: #1b1914;
  --color-surface-sunken: #0e0d0b;

  /* Text */
  --color-text: #f6f0e5;
  --color-text-muted: #aaa394;
  --color-text-subtle: #8d867b;
  --color-text-body: #c7bfb3;
  --color-text-inverse: #17120c;

  /* Brand */
  --color-accent: #d69b54;
  --color-accent-soft: #f1d5a8;
  --color-accent-deep: #6f3e20;

  /* Lines & shadows */
  --color-border: rgba(255, 255, 255, 0.09);
  --shadow-card: 0 25px 70px rgba(0, 0, 0, 0.45);
  --shadow-portrait: 0 40px 100px rgba(0, 0, 0, 0.55), 0 0 100px rgba(214, 155, 84, 0.1);

  /* Typography */
  --font-sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, monospace;

  /* Spacing & shape */
  --space-section: 110px;
  --radius-md: 10px;
  --radius-lg: 25px;
  --radius-xl: 30px;
  --radius-pill: 999px;

  /* Structure */
  --nav-height: 76px;
  --content-width: 1160px;
  --content-gutter: 40px;

  /* Motion */
  --transition-base: 0.2s ease;
}

/* 2. Reset & base
   ========================================================================== */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-height);
}

body {
  margin: 0;
  color: var(--color-text);
  background:
    radial-gradient(circle at 50% -10%, rgba(214, 155, 84, 0.16), transparent 30rem),
    var(--color-bg);
  font-family: var(--font-sans);
  overflow-x: hidden;
}

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

button {
  font: inherit;
}

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

:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
  border-radius: 4px;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* 3. Layout primitives
   ========================================================================== */

.wrap {
  width: min(var(--content-width), calc(100% - var(--content-gutter)));
  margin-inline: auto;
}

section {
  padding: var(--space-section) 0;
  border-top: 1px solid var(--color-border);
}

.section-head {
  max-width: 760px;
  margin-bottom: 55px;
}

.section-head p {
  color: var(--color-text-muted);
  font-size: 1.05rem;
  line-height: 1.75;
}

h1 {
  margin: 14px 0 24px;
  font-size: clamp(4.8rem, 12vw, 10.5rem);
  font-weight: 900;
  line-height: 0.75;
  letter-spacing: -0.075em;
}

h1 .ticker {
  display: block;
  margin-top: 30px;
  color: var(--color-accent);
  font-size: 0.28em;
  letter-spacing: 0.04em;
}

h2 {
  margin: 10px 0 18px;
  font-size: clamp(2.7rem, 7vw, 5.5rem);
  line-height: 0.95;
  letter-spacing: -0.055em;
}

.eyebrow {
  color: var(--color-accent);
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.28em;
  text-transform: uppercase;
}

.accent {
  color: var(--color-accent);
}

/* Visually hidden until focused — keyboard skip link. */
.skip-link {
  position: absolute;
  left: 50%;
  top: 0;
  z-index: 100;
  padding: 12px 20px;
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  background: var(--color-accent);
  color: var(--color-text-inverse);
  font-weight: 800;
  transform: translate(-50%, -120%);
}

.skip-link:focus {
  transform: translate(-50%, 0);
}

/* 4. Components
   ========================================================================== */

/* Site navigation */
.site-nav {
  position: fixed;
  z-index: 50;
  top: 0;
  right: 0;
  left: 0;
  background: rgba(11, 11, 10, 0.76);
  border-bottom: 1px solid var(--color-border);
  backdrop-filter: blur(18px);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: var(--nav-height);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 26px;
  color: #d9d1c4;
  font-size: 0.9rem;
  font-weight: 700;
}

.nav-links a:hover {
  color: var(--color-accent);
}

/* Brand lockup */
.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  font-weight: 900;
  letter-spacing: 0.06em;
}

.brand-mark {
  flex: none;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--color-surface-raised);
  border: 1px solid rgba(241, 213, 168, 0.4);
  box-shadow: 0 0 35px rgba(214, 155, 84, 0.22);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 0 22px;
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  background: var(--color-accent);
  color: var(--color-text-inverse);
  font-weight: 900;
  cursor: pointer;
  transition: transform var(--transition-base), box-shadow var(--transition-base),
    color var(--transition-base), border-color var(--transition-base);
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(214, 155, 84, 0.2);
}

.btn--ghost {
  background: transparent;
  color: var(--color-text);
  border-color: var(--color-border);
}

.btn--ghost:hover {
  border-color: rgba(214, 155, 84, 0.55);
  color: var(--color-accent);
}

/* Feature cards */
.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.card {
  min-height: 240px;
  padding: 32px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: linear-gradient(
    145deg,
    rgba(255, 255, 255, 0.035),
    rgba(255, 255, 255, 0.01)
  );
  box-shadow: var(--shadow-card);
}

.card__label {
  color: var(--color-accent);
  font-size: 0.75rem;
  font-weight: 900;
  letter-spacing: 0.2em;
}

.card h3 {
  margin: 45px 0 12px;
  font-size: 1.5rem;
}

.card p {
  margin: 0;
  color: var(--color-text-muted);
  line-height: 1.7;
}

/* Token specification table */
.token-box {
  overflow: hidden;
  margin: 0; /* reset the default <dl> block margin */
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  background: var(--color-surface);
}

.token-row {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 20px;
  padding: 24px 30px;
  border-bottom: 1px solid var(--color-border);
}

.token-row:last-child {
  border-bottom: 0;
}

.token-row dt {
  color: var(--color-text-muted);
}

.token-row dd {
  margin: 0;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.contract {
  display: flex;
  flex-wrap: wrap; /* the address is long enough to need its own line on phones */
  align-items: center;
  gap: 10px;
}

.contract__value {
  color: var(--color-accent-soft);
  font-family: var(--font-mono);
  overflow-wrap: anywhere;
}

.contract__copy {
  padding: 8px 12px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: #22201b;
  color: #eee;
  font-weight: 800;
  cursor: pointer;
  transition: border-color var(--transition-base), color var(--transition-base);
}

.contract__copy:hover {
  border-color: rgba(214, 155, 84, 0.55);
  color: var(--color-accent);
}

/* 5. Sections
   ========================================================================== */

/* Hero */
.hero {
  position: relative;
  display: grid;
  align-items: center;
  min-height: 100vh;
  padding: 145px 0 85px;
}

/* Oversized decorative wordmark behind the hero content. */
.hero::before {
  content: "JIM";
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -52%);
  color: rgba(255, 255, 255, 0.018);
  font-size: min(34vw, 31rem);
  font-weight: 900;
  line-height: 0.7;
  letter-spacing: -0.08em;
  pointer-events: none;
}

.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  align-items: center;
  gap: 70px;
}

.hero-copy {
  max-width: 650px;
  color: #c8c0b4;
  font-size: 1.16rem;
  line-height: 1.75;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 34px;
}

/* Portrait */
.portrait {
  position: relative;
  width: min(100%, 500px);
  margin: auto;
  padding: 11px;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  background: linear-gradient(145deg, var(--color-accent-soft), var(--color-accent-deep));
  box-shadow: var(--shadow-portrait);
}

.portrait__frame {
  position: relative;
  height: 100%;
  overflow: hidden;
  border: 8px solid var(--color-surface-sunken);
  border-radius: 50%;
  background: #191713;
}

.portrait__frame picture {
  display: block;
  height: 100%;
}

.portrait__frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.portrait__badge {
  position: absolute;
  right: -5px;
  bottom: 12%;
  padding: 12px 18px;
  border-radius: var(--radius-pill);
  background: #f3eadc;
  color: #18130e;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  transform: rotate(-5deg);
}

/* Pull quote */
.quote {
  padding: 90px 25px;
  background: var(--color-accent);
  color: #17110b;
  text-align: center;
}

.quote p {
  max-width: 1050px;
  margin: 0 auto;
  font-size: clamp(2.7rem, 7vw, 6.2rem);
  font-weight: 900;
  line-height: 0.94;
  letter-spacing: -0.055em;
}

/* Lore */
.story {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  align-items: start;
  gap: 80px;
}

.story-copy p {
  margin: 0 0 22px;
  color: var(--color-text-body);
  font-size: 1.12rem;
  line-height: 1.9;
}

.story-copy strong {
  color: var(--color-text);
}

.story-copy__born {
  margin: 45px 0 20px;
  color: var(--color-accent);
  font-size: clamp(2.2rem, 5vw, 4rem);
  font-weight: 900;
  letter-spacing: -0.04em;
}

/* Manifesto */
.manifesto {
  background: var(--color-surface-sunken);
}

.manifesto-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}

.manifesto-item {
  padding: 28px;
  border-left: 3px solid var(--color-accent);
  background: rgba(255, 255, 255, 0.025);
}

.manifesto-item h3 {
  margin: 0 0 10px;
  font-size: 1.25rem;
}

.manifesto-item p {
  margin: 0;
  color: var(--color-text-muted);
  line-height: 1.7;
}

/* Community */
.community {
  text-align: center;
}

.community .section-head {
  margin-inline: auto;
}

.community-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

/* Footer */
.site-footer {
  padding: 45px 0;
  border-top: 1px solid var(--color-border);
  color: var(--color-text-subtle);
}

.footer-grid {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 30px;
}

.footer-disclaimer {
  max-width: 760px;
  margin: 0;
  font-size: 0.75rem;
  line-height: 1.7;
}

/* 6. Responsive
   ========================================================================== */

@media (max-width: 850px) {
  .nav-links a:not(.btn) {
    display: none;
  }

  .hero {
    text-align: center;
  }

  .hero-grid,
  .story {
    grid-template-columns: 1fr;
  }

  .hero-copy {
    margin-inline: auto;
  }

  .hero-actions {
    justify-content: center;
  }

  .portrait {
    width: min(86vw, 430px);
  }

  .cards,
  .manifesto-grid {
    grid-template-columns: 1fr;
  }

  .token-row {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .footer-grid {
    flex-direction: column;
  }
}
