/* ==========================================================================
   Ghostcard — calm editorial fintech design system with motion
   Companion to references/design.md. Pair with assets/ghostcard.js for
   word reveals, count-up, scroll reveals, and parallax drift.
   ========================================================================== */


:root {
  /* color tokens */
  --gc-canvas: #FFFFFF;
  --gc-canvas-soft: #FBFBF7;
  --gc-ink: #12140A;
  --gc-text-secondary: #6B6E5F;
  --gc-text-muted: #A3A695;
  --gc-line: #E8E8E0;
  --gc-lime: #94A51E;
  --gc-lime-dark: #6E7A12;
  --gc-pale-green: #E9F0DB;
  --gc-glass: rgba(255, 255, 255, 0.18);
  --gc-hill-deep: #3E5232;
  --gc-hill-mid: #7A9061;
  --gc-hill-light: #C9D6B4;

  /* type */
  --gc-font-serif: 'Instrument Serif', Georgia, serif;
  --gc-font-sans: 'Inter', -apple-system, sans-serif;

  /* motion tokens */
  --gc-ease: cubic-bezier(0.25, 1, 0.5, 1);   /* soft ease-out */
  --gc-dur-hover: 200ms;
  --gc-dur-enter: 900ms;

  /* elevation */
  --gc-shadow-float: 0 24px 64px rgba(18, 20, 10, 0.12);
}

/* ---------- base ---------- */

body {
  margin: 0;
  background: var(--gc-canvas);
  color: var(--gc-ink);
  font-family: var(--gc-font-sans);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, .gc-serif {
  font-family: var(--gc-font-serif);
  font-weight: 400;
  color: var(--gc-ink);
  margin: 0;
  line-height: 1.1;
}
h1 { font-size: clamp(48px, 7vw, 80px); }
h2 { font-size: clamp(34px, 4.5vw, 56px); }

.gc-wordmark {
  font-family: var(--gc-font-serif);
  font-style: italic;
  font-size: 20px;
  color: var(--gc-ink);
  text-decoration: none;
}

.gc-muted { color: var(--gc-text-muted); }
.gc-small { font-size: 13px; color: var(--gc-text-secondary); }

::selection { background: var(--gc-lime); color: #fff; }

:where(a, button, input, [tabindex]):focus-visible {
  outline: 2px solid var(--gc-lime);
  outline-offset: 2px;
}

/* ---------- hills photo approximation (swap for real photography) ---------- */

.gc-hills {
  background:
    radial-gradient(120% 90% at 20% 100%, var(--gc-hill-mid) 0%, transparent 60%),
    radial-gradient(140% 100% at 85% 110%, var(--gc-hill-deep) 0%, transparent 55%),
    radial-gradient(100% 80% at 50% 120%, var(--gc-hill-deep) 0%, transparent 65%),
    linear-gradient(180deg, #F4F6EE 0%, var(--gc-hill-light) 45%, var(--gc-hill-mid) 100%);
}

/* ---------- kicker pill ---------- */

.gc-kicker {
  display: inline-block;
  padding: 8px 18px;
  border: 1px solid var(--gc-line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(6px);
  font-family: var(--gc-font-serif);
  font-style: italic;
  font-size: 15px;
  color: var(--gc-ink);
}

/* ---------- buttons (all pills) ---------- */

.gc-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 26px;
  border: 1px solid transparent;
  border-radius: 999px;
  font: 500 13px var(--gc-font-sans);
  cursor: pointer;
  transition: background var(--gc-dur-hover) var(--gc-ease),
              transform var(--gc-dur-hover) var(--gc-ease),
              border-color var(--gc-dur-hover) var(--gc-ease);
}
.gc-btn--lime {
  background: var(--gc-lime);
  color: #fff;
}
.gc-btn--lime:hover {
  background: var(--gc-lime-dark);
  transform: translateY(-1px);
}
.gc-btn--white {
  background: #fff;
  color: var(--gc-ink);
  box-shadow: 0 4px 16px rgba(18, 20, 10, 0.10);
}
.gc-btn--white:hover { transform: translateY(-1px); }
.gc-btn--outline {
  background: transparent;
  border-color: var(--gc-line);
  color: var(--gc-ink);
}
.gc-btn--outline:hover { border-color: var(--gc-ink); }

/* ---------- topbar ---------- */

.gc-topbar {
  display: flex;
  align-items: center;
  gap: 40px;
  padding: 20px 48px;
  position: relative;
  z-index: 3;
}
.gc-topbar__links { display: flex; gap: 28px; margin: 0 auto; }
.gc-topbar__links a {
  color: var(--gc-ink);
  text-decoration: none;
  font-size: 13px;
  transition: opacity var(--gc-dur-hover) var(--gc-ease);
}
.gc-topbar__links a:hover { opacity: 0.5; }
.gc-topbar__actions { display: flex; gap: 10px; }

/* ---------- hero ---------- */

.gc-hero {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  padding: 0 48px 96px;
}
.gc-hero__bg {
  position: absolute;
  inset: -4%;
  z-index: 0;
  animation: gc-kenburns 24s ease-in-out infinite alternate;
  will-change: transform;
}
@keyframes gc-kenburns {
  from { transform: scale(1); }
  to   { transform: scale(1.08); }
}
.gc-hero__content {
  position: relative;
  z-index: 2;
  display: grid;
  gap: 20px;
  justify-items: start;
}
.gc-hero__note {
  position: absolute;
  top: 96px;
  right: 48px;
  z-index: 2;
  max-width: 200px;
  text-align: right;
  font-size: 13px;
  color: var(--gc-ink);
}

/* ---------- floating glass card ---------- */

.gc-glasscard {
  position: absolute;
  z-index: 2;
  width: min(340px, 34vw);
  aspect-ratio: 1.586;
  border-radius: 20px;
  background: var(--gc-glass);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.4);
  box-shadow: var(--gc-shadow-float);
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  animation: gc-levitate 6s ease-in-out infinite;
  will-change: transform;
}
@keyframes gc-levitate {
  0%, 100% { transform: translateY(-12px) rotate(-2deg); }
  50%      { transform: translateY(12px) rotate(2deg); }
}
.gc-glasscard__chip {
  width: 34px;
  height: 24px;
  border-radius: 5px;
  border: 1px solid rgba(255, 255, 255, 0.65);
  background: rgba(255, 255, 255, 0.28);
}
.gc-glasscard__circles { display: flex; align-self: flex-end; }
.gc-glasscard__circles i {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--gc-lime);
  opacity: 0.9;
}
.gc-glasscard__circles i:last-child {
  margin-left: -10px;
  background: #E4572E;
}

/* ---------- word reveal (spans injected by ghostcard.js) ---------- */

.gc-words { display: inline-block; }
.gc-words .gc-w {
  display: inline-block;
  overflow: hidden;
  vertical-align: bottom;
}
.gc-words .gc-w > span {
  display: inline-block;
  transform: translateY(110%);
  transition: transform var(--gc-dur-enter) var(--gc-ease);
}
.gc-words.is-revealed .gc-w > span { transform: translateY(0); }

/* ---------- scroll reveal ---------- */

[data-gc-reveal] {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity var(--gc-dur-enter) var(--gc-ease),
              transform var(--gc-dur-enter) var(--gc-ease);
}
[data-gc-reveal].is-revealed {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- sections ---------- */

.gc-section { padding: 120px 48px; position: relative; }
.gc-section--soft { background: var(--gc-canvas-soft); }
.gc-section__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 48px;
  margin-bottom: 64px;
}

/* ---------- feature cards ---------- */

.gc-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.gc-card {
  border-radius: 24px;
  padding: 32px;
  min-height: 260px;
  display: flex;
  flex-direction: column;
}
.gc-card--quote {
  background: linear-gradient(160deg, var(--gc-pale-green), #fff 85%);
}
.gc-card--flat { border: 1px solid var(--gc-line); }
.gc-card__quote {
  font-family: var(--gc-font-serif);
  font-style: italic;
  font-size: 20px;
  line-height: 1.35;
}
.gc-card__by {
  margin-top: auto;
  font-size: 12px;
  color: var(--gc-text-secondary);
}
.gc-card__title { font-family: var(--gc-font-serif); font-size: 20px; }
.gc-card__text { font-size: 13px; color: var(--gc-text-secondary); margin: 10px 0 24px; }

/* ring day-counter */
.gc-ring {
  position: relative;
  width: 180px;
  height: 180px;
  margin: auto;
  border-radius: 50%;
  overflow: hidden;
  display: grid;
  place-items: center;
}
.gc-ring::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: conic-gradient(var(--gc-lime) var(--gc-arc, 70%), rgba(255,255,255,0.5) 0);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 4px), #000 calc(100% - 3px));
          mask: radial-gradient(farthest-side, transparent calc(100% - 4px), #000 calc(100% - 3px));
}
.gc-ring__inner {
  position: relative;
  text-align: center;
  color: #fff;
  text-shadow: 0 1px 8px rgba(18, 20, 10, 0.4);
}
.gc-ring__num {
  font-family: var(--gc-font-serif);
  font-size: 72px;
  line-height: 1;
}
.gc-ring__cap {
  font: 500 11px var(--gc-font-sans);
  letter-spacing: 0.2em;
}

/* ---------- phone mockups ---------- */

.gc-phones { display: flex; gap: 40px; justify-content: center; align-items: flex-start; }
.gc-phone {
  width: min(300px, 40vw);
  aspect-ratio: 0.49;
  border-radius: 48px;
  border: 6px solid var(--gc-ink);
  background: #fff;
  box-shadow: var(--gc-shadow-float);
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
}
.gc-phone--offset { margin-top: 48px; }
.gc-phone__screen {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 20px;
  position: relative;
}
.gc-phone__brand { font-family: var(--gc-font-serif); font-style: italic; font-size: 18px; }
.gc-phone__list {
  margin-top: auto;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  border-radius: 20px;
  padding: 16px;
}
.gc-txn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  font-size: 12px;
  border-bottom: 1px solid var(--gc-line);
}
.gc-txn:last-child { border-bottom: 0; }
.gc-txn__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--gc-lime); }
.gc-txn__name { font-weight: 500; }
.gc-txn__cat { color: var(--gc-text-muted); font-size: 11px; }
.gc-txn__amt { margin-left: auto; }
.gc-note { font-size: 13px; color: var(--gc-text-secondary); }

/* ---------- CTA band ---------- */

.gc-cta {
  position: relative;
  overflow: hidden;
  text-align: center;
  padding: 140px 32px;
}
.gc-cta > * { position: relative; z-index: 1; }
.gc-cta h2 { margin: 24px 0 16px; }
.gc-cta p { color: var(--gc-text-secondary); font-size: 14px; margin: 0 0 32px; }
.gc-cta__form {
  display: inline-flex;
  gap: 8px;
  background: #fff;
  border: 1px solid var(--gc-line);
  border-radius: 999px;
  padding: 6px;
  box-shadow: 0 8px 32px rgba(18, 20, 10, 0.10);
}
.gc-cta__form input {
  border: 0;
  outline: none;
  background: transparent;
  padding: 0 16px;
  font: 400 13px var(--gc-font-sans);
  color: var(--gc-ink);
  width: 220px;
}
.gc-cta__form input::placeholder { color: var(--gc-text-muted); }

/* ---------- footer ---------- */

.gc-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  padding: 32px 48px;
  border-top: 1px solid var(--gc-line);
  font-size: 12px;
  color: var(--gc-text-secondary);
}
.gc-footer a { color: inherit; text-decoration: none; margin: 0 12px; }
.gc-footer a:hover { color: var(--gc-ink); }

/* ---------- reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  .gc-hero__bg,
  .gc-glasscard { animation: none; }
  [data-gc-reveal] {
    transition: opacity 200ms linear;
    transform: none;
  }
  .gc-words .gc-w > span { transition: none; transform: none; }
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
  }
}
