/*
Theme Name: TypeGlow Landing
Theme URI: https://typeglow.ahxstudio.com/
Author: AHX Studio
Author URI: https://ahxstudio.com/
Description: Ultra-lightweight, mobile-first, single-page light theme built to convert paid social traffic into App Store downloads for the TypeGlow iOS keyboard app. Oversized editorial typography, layered display type, zero JavaScript.
Version: 3.0.0
Requires at least: 5.9
Tested up to: 6.7
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: typeglow
Tags: one-column, custom-colors, full-width-template, landing-page
*/

/* ============================================================
   1. RESET
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }
html, body, h1, h2, h3, p, figure, ul, ol, li { margin: 0; padding: 0; }
ul, ol { list-style: none; }
img, svg { display: block; max-width: 100%; height: auto; }
a { text-decoration: none; color: inherit; -webkit-tap-highlight-color: transparent; }

html {
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}

/* ============================================================
   2. TOKENS
   ============================================================ */
:root {
  --paper:   #F2F1EC;   /* warm off-white page */
  --card:    #FFFFFF;
  --ink:     #101014;
  --ink-2:   #0B0B0E;   /* inverted blocks */
  --muted:   #63636C;
  --dim:     #9C9CA3;
  --line:    rgba(16, 16, 20, 0.13);
  --line-2:  rgba(16, 16, 20, 0.08);
  --ghost:   rgba(16, 16, 20, 0.075);

  --cyan:    #00E5F5;
  --purple:  #B400F0;

  --maxw:    100%;
  --gut:     22px;

  --sans: "Inter Tight", -apple-system, BlinkMacSystemFont, "SF Pro Display",
          "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --display: "Instrument Serif", "Iowan Old Style", Georgia, serif;
}

/* ============================================================
   3. BASE
   ============================================================ */
body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  font-synthesis-weight: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* paper grain — keeps the light surface from looking flat */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.tg-wrap {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--gut);
}

.tg-skip { position: absolute; left: -9999px; }
.tg-skip:focus {
  left: 12px; top: 12px; z-index: 99;
  background: var(--ink); color: var(--paper);
  padding: 10px 16px; border-radius: 6px;
}
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

.tg-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ============================================================
   4. NAV
   ============================================================ */
.tg-nav-in {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.tg-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.035em;
}
.tg-logo i {
  width: 9px; height: 9px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--cyan), var(--purple));
}
.tg-nav-cta {
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: -0.01em;
  padding: 9px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
}

/* ============================================================
   5. SECTION 1 — HERO
   ============================================================ */
.tg-hero { padding: 26px 0 0; }

.tg-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
}
.tg-eyebrow i {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 0 4px rgba(0, 229, 245, 0.18);
  animation: tg-blink 2.6s ease-in-out infinite;
}
@keyframes tg-blink { 0%,100%{opacity:1} 50%{opacity:.3} }

/* Oversized display headline */
.tg-title {
  font-size: clamp(3.4rem, 17vw, 4.9rem);
  line-height: 0.86;
  font-weight: 700;
  letter-spacing: -0.052em;
  margin-bottom: 22px;
}
.tg-title span { display: block; }
.tg-title em {
  font-family: var(--display);
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.025em;
  padding-right: 0.04em;
}
.tg-title .tg-out {
  -webkit-text-fill-color: transparent;
  -webkit-text-stroke: 1.6px var(--ink);
  color: transparent;
}

.tg-sub {
  font-size: 16.5px;
  line-height: 1.55;
  color: var(--muted);
  max-width: 34ch;
  margin-bottom: 26px;
  letter-spacing: -0.01em;
}

.tg-stats {
  display: flex;
  gap: 26px;
  padding: 15px 0;
  margin-bottom: 24px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.tg-stat b {
  display: block;
  font-size: 21px;
  font-weight: 700;
  letter-spacing: -0.04em;
}
.tg-stat span {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--dim);
}

/* ============================================================
   6. BUTTON
   ============================================================ */
.tg-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 58px;
  padding: 15px 26px;
  border-radius: 999px;
  font-size: 16.5px;
  font-weight: 600;
  letter-spacing: -0.02em;
  transition: transform 0.12s ease;
}
.tg-btn:active { transform: scale(0.985); }
.tg-btn svg { width: 19px; height: 22px; }

.tg-btn--solid {
  background: var(--ink);
  color: var(--paper);
  box-shadow: 0 8px 26px rgba(16, 16, 20, 0.20);
}
.tg-btn--solid svg { fill: var(--paper); }

.tg-btn--light {
  background: #FFFFFF;
  color: var(--ink-2);
}
.tg-btn--light svg { fill: var(--ink-2); }

.tg-btn-note {
  margin-top: 12px;
  font-size: 12.5px;
  color: var(--dim);
  letter-spacing: -0.005em;
}

/* ============================================================
   7. STAGE — giant type behind the device
   ============================================================ */
.tg-stage {
  position: relative;
  margin-top: 30px;
  padding-bottom: 8px;
  display: flex;
  justify-content: center;
}

/* the giant word bleeds sideways but must never clip the device,
   so it gets its own clipping layer underneath */
.tg-ghost-layer {
  position: absolute;
  inset: -6% -22px 12%;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.tg-ghost {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  font-size: clamp(5.5rem, 27vw, 11rem);
  font-weight: 800;
  letter-spacing: -0.06em;
  line-height: 0.78;
  white-space: nowrap;
  user-select: none;
  background: linear-gradient(103deg, var(--cyan) 0%, var(--purple) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  opacity: 0.55;
}

/* ============================================================
   8. DEVICE
   ============================================================ */
.tg-device {
  position: relative;
  z-index: 1;
  width: min(288px, 76vw);
  padding: 9px;
  border-radius: 46px;
  background: linear-gradient(155deg, #34343C 0%, #101015 48%, #2C2C34 100%);
  box-shadow: 0 34px 70px rgba(16, 16, 20, 0.30), 0 6px 18px rgba(16, 16, 20, 0.14);
}
.tg-device-screen {
  position: relative;
  border-radius: 38px;
  background: #060609;
  overflow: hidden;
  padding: 40px 10px 0;
}
.tg-notch {
  position: absolute;
  top: 11px; left: 50%;
  transform: translateX(-50%);
  width: 86px; height: 22px;
  border-radius: 999px;
  background: #000;
}

.tg-preview { padding: 4px 8px 14px; }
.tg-preview-label {
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #55555F;
  margin-bottom: 9px;
}
.tg-field {
  padding: 12px 13px;
  margin-bottom: 12px;
  border-radius: 12px;
  background: #131319;
  border: 1px solid rgba(255,255,255,0.07);
  font-size: 14px;
  letter-spacing: -0.01em;
  color: #E4FDFF;
  animation: tg-kinetic 4s ease-in-out infinite;
}
@keyframes tg-kinetic {
  0%,100% { text-shadow: 0 0 8px rgba(0, 229, 245, 0.6); }
  38%     { text-shadow: 0 0 15px rgba(180, 0, 240, 0.9); }
  70%     { text-shadow: 0 0 13px rgba(0, 229, 245, 0.95); }
}

.tg-theme-row { display: flex; gap: 7px; }
.tg-theme-row i {
  flex: 1;
  height: 30px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.08);
}
.tg-theme-row .tg-t1 { background: linear-gradient(135deg, #2A1B4D, #6D28D9); }
.tg-theme-row .tg-t2 { background: linear-gradient(135deg, #062B33, #00E5F5); }
.tg-theme-row .tg-t3 { background: linear-gradient(135deg, #3B0B2E, #FF2D95); }
.tg-theme-row .is-on {
  border-color: rgba(255,255,255,0.75);
  box-shadow: 0 0 0 2px rgba(255,255,255,0.16);
}

.tg-kb {
  display: grid;
  gap: 6px;
  padding: 9px 5px 13px;
  background: #0C0C11;
  border-top: 1px solid rgba(255,255,255,0.05);
}
.tg-kb-row { display: grid; gap: 5px; grid-template-columns: repeat(10, 1fr); }
.tg-kb-row--2 { padding: 0 5%; grid-template-columns: repeat(9, 1fr); }
.tg-kb-row--3 { padding: 0 13%; grid-template-columns: repeat(7, 1fr); }

.tg-key {
  position: relative;
  height: 26px;
  border-radius: 6px;
  background: #17171D;
  box-shadow: inset 0 -1px 0 rgba(0,0,0,0.6), inset 0 1px 0 rgba(255,255,255,0.045);
}
.tg-key--c {
  background: rgba(0, 229, 245, 0.10);
  animation: tg-lit-c 3s ease-in-out infinite;
}
.tg-key--p {
  background: rgba(180, 0, 240, 0.10);
  animation: tg-lit-p 3s ease-in-out infinite 0.9s;
}
@keyframes tg-lit-c {
  0%,100% { box-shadow: 0 0 5px rgba(0,229,245,.28), inset 0 0 5px rgba(0,229,245,.16); }
  50%     { box-shadow: 0 0 16px rgba(0,229,245,.9), inset 0 0 12px rgba(0,229,245,.46); }
}
@keyframes tg-lit-p {
  0%,100% { box-shadow: 0 0 5px rgba(180,0,240,.28), inset 0 0 5px rgba(180,0,240,.16); }
  50%     { box-shadow: 0 0 16px rgba(180,0,240,.9), inset 0 0 12px rgba(180,0,240,.46); }
}

/* audible keypress — expanding sound rings */
.tg-key--tap::before,
.tg-key--tap::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 6px;
  border: 1px solid rgba(0, 229, 245, 0.8);
  animation: tg-ring 2.2s ease-out infinite;
}
.tg-key--tap::after { animation-delay: 0.65s; }
@keyframes tg-ring {
  0%  { opacity: .85; transform: scale(1); }
  75% { opacity: 0;   transform: scale(2.5); }
  100%{ opacity: 0;   transform: scale(2.5); }
}

.tg-kb-space {
  height: 25px;
  border-radius: 6px;
  background: #17171D;
  box-shadow: inset 0 -1px 0 rgba(0,0,0,0.6);
}

/* ============================================================
   9. SECTION 2 — FEATURES
   ============================================================ */
.tg-features { padding: 54px 0 48px; }

.tg-sec-head {
  display: flex;
  flex-direction: column-reverse;
  align-items: flex-start;
  gap: 12px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}
.tg-h2 {
  font-size: clamp(2.1rem, 10vw, 2.9rem);
  font-weight: 700;
  letter-spacing: -0.048em;
  line-height: 0.92;
}
.tg-h2 em {
  font-family: var(--display);
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.02em;
}
.tg-sec-head .tg-label { flex: 0 0 auto; white-space: nowrap; }

.tg-row {
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: 4px 12px;
  padding: 24px 0;
  border-bottom: 1px solid var(--line-2);
}
.tg-num {
  font-size: 12px;
  font-weight: 600;
  color: var(--dim);
  padding-top: 6px;
  letter-spacing: 0.02em;
}
.tg-row h3 {
  font-size: 21px;
  font-weight: 700;
  letter-spacing: -0.04em;
  margin-bottom: 6px;
}
.tg-row p {
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--muted);
  letter-spacing: -0.008em;
  max-width: 42ch;
}
.tg-row-extra { grid-column: 2; margin-top: 15px; }

.tg-swatches { display: flex; gap: 8px; }
.tg-swatches i { width: 28px; height: 28px; border-radius: 8px; display: block; }
.tg-swatches i:nth-child(1){ background:#00E5F5; box-shadow:0 3px 12px rgba(0,229,245,.5); }
.tg-swatches i:nth-child(2){ background:#B400F0; box-shadow:0 3px 12px rgba(180,0,240,.45); }
.tg-swatches i:nth-child(3){ background:#FF2D95; box-shadow:0 3px 12px rgba(255,45,149,.45); }
.tg-swatches i:nth-child(4){ background:#19E07A; box-shadow:0 3px 12px rgba(25,224,122,.45); }
.tg-swatches i:nth-child(5){ background:#FFB020; box-shadow:0 3px 12px rgba(255,176,32,.45); }

.tg-sliders { display: grid; gap: 10px; max-width: 210px; }
.tg-slider {
  position: relative;
  height: 6px;
  border-radius: 999px;
  background: rgba(16, 16, 20, 0.11);
}
.tg-slider i {
  position: absolute;
  top: 0; bottom: 0; left: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--cyan), var(--purple));
}
.tg-slider--a i { width: 68%; }
.tg-slider--b i { width: 36%; }

.tg-wave { display: flex; align-items: center; gap: 4px; height: 32px; }
.tg-wave i {
  width: 3px;
  border-radius: 2px;
  background: var(--ink);
  animation: tg-eq 1.15s ease-in-out infinite;
}
.tg-wave i:nth-child(1){height:38%;animation-delay:0s}
.tg-wave i:nth-child(2){height:76%;animation-delay:.1s}
.tg-wave i:nth-child(3){height:100%;animation-delay:.2s}
.tg-wave i:nth-child(4){height:60%;animation-delay:.3s}
.tg-wave i:nth-child(5){height:88%;animation-delay:.4s}
.tg-wave i:nth-child(6){height:32%;animation-delay:.5s}
.tg-wave i:nth-child(7){height:66%;animation-delay:.6s}
.tg-wave i:nth-child(8){height:44%;animation-delay:.7s}
@keyframes tg-eq {
  0%,100% { transform: scaleY(.4); opacity: .35; }
  50%     { transform: scaleY(1);  opacity: 1; }
}

.tg-chips { display: flex; flex-wrap: wrap; gap: 7px; }
.tg-chips span {
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--muted);
  padding: 6px 12px;
  background: var(--card);
  border: 1px solid var(--line-2);
  border-radius: 999px;
}

/* Inverted closing block */
.tg-close {
  position: relative;
  margin-top: 40px;
  padding: 44px 24px 40px;
  border-radius: 26px;
  background: var(--ink-2);
  color: var(--paper);
  text-align: center;
  overflow: hidden;
}
.tg-close::before {
  content: "";
  position: absolute;
  top: -90px; left: 50%;
  width: 380px; height: 300px;
  transform: translateX(-50%);
  background: radial-gradient(circle, rgba(0,229,245,0.28) 0%, rgba(0,229,245,0) 68%);
  pointer-events: none;
}
.tg-close h2 {
  position: relative;
  font-size: clamp(2rem, 9.5vw, 2.6rem);
  font-weight: 700;
  letter-spacing: -0.05em;
  line-height: 0.94;
  margin-bottom: 22px;
}
.tg-close h2 em {
  font-family: var(--display);
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.02em;
}
.tg-close .tg-btn { position: relative; }
.tg-close .tg-btn-note { color: rgba(242, 241, 236, 0.42); }

/* ============================================================
   10. FOOTER
   ============================================================ */
.tg-footer {
  border-top: 1px solid var(--line-2);
  padding: 20px 0 calc(102px + env(safe-area-inset-bottom));
}
.tg-footer-in {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 12.5px;
  color: var(--dim);
}
.tg-footer a { color: var(--muted); }

/* ============================================================
   11. STICKY CTA
   ============================================================ */
.tg-sticky {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 40;
  padding: 12px var(--gut) calc(12px + env(safe-area-inset-bottom));
  background: rgba(242, 241, 236, 0.88);
  -webkit-backdrop-filter: blur(16px) saturate(150%);
  backdrop-filter: blur(16px) saturate(150%);
  border-top: 1px solid var(--line-2);
}

/* ============================================================
   12. RESPONSIVE
   ============================================================ */
@media (min-width: 560px) {
  .tg-btn { width: auto; min-width: 280px; }
  .tg-hero .tg-btn { display: inline-flex; }
  .tg-close .tg-btn { display: inline-flex; }
  .tg-sticky .tg-btn { width: 100%; }
}

@media (min-width: 900px) {
  :root { --maxw: 1120px; --gut: 40px; }

  .tg-hero { padding: 48px 0 0; }
  .tg-hero-in {
    display: grid;
    grid-template-columns: 1fr 0.86fr;
    gap: 40px;
    align-items: center;
  }
  .tg-title { font-size: 6.1rem; line-height: 0.84; }
  .tg-sub { font-size: 18px; }

  .tg-stage { margin-top: 0; }
  .tg-ghost { font-size: 13rem; }
  .tg-ghost-layer { inset: -10% -40px 16%; }
  .tg-device { width: 296px; }

  .tg-features { padding: 92px 0 64px; }
  .tg-sec-head {
    flex-direction: row;
    align-items: baseline;
    justify-content: space-between;
    gap: 18px;
  }
  .tg-rows { display: grid; grid-template-columns: repeat(2, 1fr); column-gap: 60px; }
  .tg-close { padding: 76px 40px 68px; border-radius: 34px; }
  .tg-close h2 { font-size: 4rem; }
  .tg-close::before { width: 700px; height: 480px; top: -160px; }

  .tg-footer { padding-bottom: 36px; }
  .tg-sticky { display: none; }
}

/* ============================================================
   13. ACCESSIBILITY
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}
