/* ============================================================
   gunaangs.github.io — hand-written, no framework
   Palette: near-black canvas, warm signal accent.
   ============================================================ */

/* ---------- Tokens ---------- */

:root {
  /* Type */
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "Inter",
               "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, "SF Mono", "JetBrains Mono", "Fira Code",
               "Roboto Mono", Menlo, Consolas, monospace;

  /* Rhythm */
  --shell: 1140px;
  --gap: clamp(1rem, 2.4vw, 1.75rem);
  --section-y: clamp(4.5rem, 11vw, 9rem);

  /* Shape */
  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 22px;
  --r-full: 999px;

  --ease: cubic-bezier(0.2, 0.7, 0.25, 1);
}

/* Dark (default) */
:root,
:root[data-theme="dark"] {
  --bg:          #0a0c10;
  --bg-alt:      #0e1116;
  --surface:     #12161d;
  --surface-2:   #171c25;
  --line:        #232a36;
  --line-soft:   #1a202a;

  --text:        #eef1f6;
  --text-mid:    #a7b0c0;
  --text-dim:    #7d8a9d;   /* >=4.5:1 on --surface; do not darken */

  --accent:      #ff7a45;
  --accent-soft: #ffb08a;
  --on-accent:   #14090400;
  --on-accent:   #180b04;
  --accent-wash: rgba(255, 122, 69, 0.11);
  --accent-line: rgba(255, 122, 69, 0.30);

  --grid-line:   rgba(255, 255, 255, 0.035);
  --shadow:      0 1px 2px rgba(0,0,0,.5), 0 12px 34px -14px rgba(0,0,0,.75);
  --shadow-lift: 0 2px 4px rgba(0,0,0,.45), 0 26px 56px -22px rgba(0,0,0,.85);
}

/* Light */
:root[data-theme="light"] {
  --bg:          #fbfaf8;
  --bg-alt:      #f4f2ee;
  --surface:     #ffffff;
  --surface-2:   #f7f5f2;
  --line:        #e2ded7;
  --line-soft:   #ece9e3;

  --text:        #16181d;
  --text-mid:    #4e5765;
  --text-dim:    #626b78;   /* >=4.5:1 on white cards; do not lighten */

  --accent:      #c2410c;
  --accent-soft: #9a3412;
  --on-accent:   #ffffff;
  --accent-wash: rgba(194, 65, 12, 0.07);
  --accent-line: rgba(194, 65, 12, 0.24);

  --grid-line:   rgba(0, 0, 0, 0.032);
  --shadow:      0 1px 2px rgba(30,25,20,.05), 0 10px 28px -14px rgba(30,25,20,.16);
  --shadow-lift: 0 2px 5px rgba(30,25,20,.07), 0 24px 50px -20px rgba(30,25,20,.2);
}

/* Follow the OS when the user hasn't chosen */
@media (prefers-color-scheme: light) {
  :root:not([data-theme]) {
    --bg: #fbfaf8; --bg-alt: #f4f2ee; --surface: #ffffff; --surface-2: #f7f5f2;
    --line: #e2ded7; --line-soft: #ece9e3;
    --text: #16181d; --text-mid: #4e5765; --text-dim: #626b78;
    --accent: #c2410c; --accent-soft: #9a3412; --on-accent: #ffffff;
    --accent-wash: rgba(194,65,12,.07); --accent-line: rgba(194,65,12,.24);
    --grid-line: rgba(0,0,0,.032);
  }
}

/* ---------- Reset ---------- */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 90px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.65;
  letter-spacing: -0.006em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  transition: background-color .35s var(--ease), color .35s var(--ease);
}

h1, h2, h3, h4 { margin: 0; line-height: 1.14; letter-spacing: -0.028em; font-weight: 640; }
p  { margin: 0 0 1.05em; }
p:last-child { margin-bottom: 0; }
ul { margin: 0; padding: 0; list-style: none; }
img, svg { display: block; max-width: 100%; }

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

code {
  font-family: var(--font-mono);
  font-size: 0.86em;
  background: var(--surface-2);
  border: 1px solid var(--line-soft);
  border-radius: 5px;
  padding: 0.1em 0.38em;
  color: var(--accent-soft);
}
:root[data-theme="light"] code { color: var(--accent); }

strong { font-weight: 620; color: var(--text); }

::selection { background: var(--accent); color: var(--on-accent); }

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

.shell {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: clamp(1.15rem, 4.5vw, 2.5rem);
}

.skip-link {
  position: absolute;
  left: 1rem; top: -100px;
  z-index: 200;
  background: var(--accent);
  color: var(--on-accent);
  padding: 0.7rem 1.15rem;
  border-radius: var(--r-sm);
  font-weight: 600;
  font-size: 0.9rem;
  transition: top .2s var(--ease);
}
.skip-link:focus { top: 1rem; }

/* ---------- Nav ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s var(--ease), background-color .3s var(--ease);
}
.nav.is-stuck { border-bottom-color: var(--line-soft); }

.nav__inner {
  display: flex;
  align-items: center;
  gap: var(--gap);
  height: 68px;
}

.mark {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  min-height: 44px;          /* WCAG target size */
  font-weight: 640;
  letter-spacing: -0.02em;
  margin-right: auto;
}
.mark__glyph {
  display: grid;
  place-items: center;
  width: 30px; height: 30px;
  border-radius: 9px;
  background: var(--accent);
  color: var(--on-accent);
  font-size: 0.94rem;
  font-weight: 750;
  line-height: 1;
}
.mark__text { font-family: var(--font-mono); font-size: 0.94rem; }

.nav__links {
  display: flex;
  gap: 0.25rem;
}
.nav__links a {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 44px;          /* WCAG target size */
  padding: 0 0.85rem;
  border-radius: var(--r-sm);
  font-size: 0.925rem;
  font-weight: 500;
  color: var(--text-mid);
  transition: color .2s var(--ease), background-color .2s var(--ease);
}
.nav__links a:hover { color: var(--text); background: var(--surface-2); }
.nav__links a.is-active { color: var(--accent); }

.theme-toggle {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 44px; height: 44px;   /* WCAG target size */
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--surface);
  color: var(--text-mid);
  cursor: pointer;
  transition: color .2s var(--ease), border-color .2s var(--ease),
              background-color .2s var(--ease);
}
.theme-toggle:hover { color: var(--accent); border-color: var(--accent-line); }
.theme-toggle__icon {
  position: absolute;
  width: 18px; height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: opacity .22s var(--ease), transform .3s var(--ease);
}
.theme-toggle { position: relative; }
:root[data-theme="dark"]  .theme-toggle__icon--sun,
:root:not([data-theme="light"]) .theme-toggle__icon--sun  { opacity: 0; transform: rotate(-70deg) scale(.6); }
:root[data-theme="dark"]  .theme-toggle__icon--moon { opacity: 1; transform: none; }
:root[data-theme="light"] .theme-toggle__icon--moon { opacity: 0; transform: rotate(70deg) scale(.6); }
:root[data-theme="light"] .theme-toggle__icon--sun  { opacity: 1; transform: none; }

/* ---------- Shared bits ---------- */

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.775rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.05rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-height: 46px;
  padding: 0.72rem 1.35rem;
  border: 1px solid transparent;
  border-radius: var(--r-full);
  font-size: 0.95rem;
  font-weight: 580;
  letter-spacing: -0.01em;
  cursor: pointer;
  white-space: nowrap;
  transition: transform .18s var(--ease), background-color .2s var(--ease),
              border-color .2s var(--ease), color .2s var(--ease),
              box-shadow .2s var(--ease);
}
.btn svg {
  width: 17px; height: 17px;
  flex-shrink: 0;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.btn svg.btn__brand { fill: currentColor; stroke: none; }
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn--primary {
  background: var(--accent);
  color: var(--on-accent);
  box-shadow: 0 6px 18px -8px var(--accent);
}
.btn--primary:hover { background: var(--accent-soft); box-shadow: 0 10px 26px -8px var(--accent); }
:root[data-theme="light"] .btn--primary:hover { background: var(--accent-soft); }

.btn--ghost {
  background: var(--surface);
  border-color: var(--line);
  color: var(--text);
}
.btn--ghost:hover { border-color: var(--accent-line); color: var(--accent); }

.btn--lg { min-height: 54px; padding: 0.9rem 1.7rem; font-size: 1rem; }

/* Play Store call-to-action inside an app card. */
.btn--play {
  background: var(--accent);
  color: var(--on-accent);
  box-shadow: 0 6px 18px -8px var(--accent);
}
.btn--play:hover { background: var(--accent-soft); box-shadow: 0 10px 26px -8px var(--accent); }

.chip {
  display: inline-flex;
  align-items: center;
  height: 25px;
  padding: 0 0.62rem;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--surface-2);
  font-family: var(--font-mono);
  font-size: 0.735rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: var(--text-dim);
  white-space: nowrap;
}
.chip--accent {
  background: var(--accent-wash);
  border-color: var(--accent-line);
  color: var(--accent);
}

.side__title {
  font-family: var(--font-mono);
  font-size: 0.755rem;
  font-weight: 500;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 1.05rem;
}

.spec { margin: 0; }
.spec > div {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  padding: 0.62rem 0;
  border-bottom: 1px solid var(--line-soft);
}
.spec > div:last-child { border-bottom: 0; padding-bottom: 0; }
.spec dt {
  flex-shrink: 0;
  font-size: 0.85rem;
  color: var(--text-dim);
}
.spec dd {
  margin: 0;
  text-align: right;
  font-family: var(--font-mono);
  font-size: 0.795rem;
  line-height: 1.45;
  color: var(--text);
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  padding-block: clamp(3.5rem, 9vw, 7rem) clamp(3.5rem, 8vw, 6rem);
  overflow: hidden;
}
.hero__grid {
  position: absolute;
  inset: -50% -10% auto -10%;
  height: 150%;
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 62px 62px;
  -webkit-mask-image: radial-gradient(ellipse 78% 52% at 50% 32%, #000 8%, transparent 72%);
          mask-image: radial-gradient(ellipse 78% 52% at 50% 32%, #000 8%, transparent 72%);
  pointer-events: none;
}
.hero__inner { position: relative; }

.hero__title {
  max-width: 17ch;
  font-size: clamp(2.5rem, 7.4vw, 4.6rem);
  font-weight: 660;
  letter-spacing: -0.038em;
  line-height: 1.04;
  margin-bottom: 1.5rem;
  text-wrap: balance;
}
.hero__title em {
  font-style: normal;
  color: var(--accent);
  position: relative;
  white-space: nowrap;
}
.hero__title em::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0.06em;
  height: 0.085em;
  background: var(--accent);
  opacity: .3;
  border-radius: 2px;
}

.hero__lede {
  max-width: 60ch;
  font-size: clamp(1.02rem, 1.7vw, 1.16rem);
  color: var(--text-mid);
  line-height: 1.68;
  margin-bottom: 2.1rem;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* ---------- Sections ---------- */

.section { padding-block: var(--section-y); }
.section--alt {
  background: var(--bg-alt);
  border-block: 1px solid var(--line-soft);
}

.section__head {
  max-width: 62ch;
  margin-bottom: clamp(2.5rem, 5vw, 3.75rem);
}
.section__title {
  font-size: clamp(1.95rem, 4.4vw, 2.9rem);
  letter-spacing: -0.033em;
  margin-bottom: 0.85rem;
  text-wrap: balance;
}
.section__lede {
  font-size: 1.06rem;
  color: var(--text-mid);
  max-width: 56ch;
}

/* ---------- Project text (shared by app cards) ---------- */

.project__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.42rem;
  margin-bottom: 1.15rem;
}

.project__title {
  font-size: clamp(1.4rem, 2.9vw, 1.85rem);
  letter-spacing: -0.03em;
  margin-bottom: 0.4rem;
}

.project__tag {
  font-size: 1.02rem;
  font-weight: 520;
  color: var(--accent);
  margin-bottom: 1.05rem;
  line-height: 1.45;
}

.project__desc {
  font-size: 0.955rem;
  line-height: 1.72;
  color: var(--text-mid);
  margin-bottom: 1.15rem;
}

/* ---------- App cards ---------- */

.app-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(330px, 1fr));
  gap: var(--gap);
}

.appcard {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: clamp(1.6rem, 3.2vw, 2.15rem);
  box-shadow: var(--shadow);
  transition: border-color .28s var(--ease), transform .28s var(--ease),
              box-shadow .28s var(--ease);
}
/* Let the download row sink to the bottom so both cards line up. */
.appcard__body {
  display: flex;
  flex-direction: column;
  flex: 1;
}
.appcard:hover {
  border-color: var(--accent-line);
  transform: translateY(-3px);
  box-shadow: var(--shadow-lift);
}

/* The real store icons — they carry their own artwork, background and
   rounded corners, so no box or border here. drop-shadow follows the
   alpha edge, unlike box-shadow, which would square off the corners. */
.appcard__icon {
  width: 64px;
  height: 64px;
  margin-bottom: 1.35rem;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, .35));
}
:root[data-theme="light"] .appcard__icon {
  filter: drop-shadow(0 3px 10px rgba(30, 25, 20, .22));
}

.applist {
  display: grid;
  gap: 0.55rem;
  margin-top: 1.3rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--line-soft);
}
.applist li {
  position: relative;
  padding-left: 1.55rem;
  font-size: 0.925rem;
  line-height: 1.6;
  color: var(--text-mid);
}
.applist li::before {
  content: "";
  position: absolute;
  left: 0.1rem;
  top: 0.44em;
  width: 11px; height: 6px;
  border-left: 1.9px solid var(--accent);
  border-bottom: 1.9px solid var(--accent);
  transform: rotate(-45deg);
}

/* ---------- Download row (QR + Play button) ---------- */

.getapp {
  display: flex;
  align-items: center;
  gap: 1.15rem;
  margin-top: auto;          /* bottom-align across cards of differing length */
  padding-top: 1.4rem;
  border-top: 1px solid var(--line-soft);
}
.applist { margin-bottom: 1.5rem; }

/* The QR is always dark-on-white so it scans in either theme. */
.getapp__qr {
  flex-shrink: 0;
  display: block;
  padding: 6px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  line-height: 0;
  transition: border-color .2s var(--ease), transform .2s var(--ease);
}
.getapp__qr:hover { border-color: var(--accent-line); transform: scale(1.03); }
.getapp__qr img { width: 100px; height: 100px; }

.getapp__cta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.6rem;
  min-width: 0;
}
.getapp__hint {
  margin: 0;
  font-size: 0.815rem;
  line-height: 1.45;
  color: var(--text-dim);
}

/* ---------- Tag list ---------- */

.taglist {
  display: flex;
  flex-wrap: wrap;
  gap: 0.42rem;
}
.taglist li {
  display: inline-flex;
  align-items: center;
  height: 28px;
  padding: 0 0.68rem;
  border: 1px solid var(--line);
  border-radius: var(--r-full);
  background: var(--surface-2);
  font-size: 0.815rem;
  font-weight: 500;
  color: var(--text-mid);
  white-space: nowrap;
}

.side__title--spaced { margin-top: 1.75rem; }

/* ---------- About ---------- */

.about {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}
.about__text p {
  font-size: 1.03rem;
  line-height: 1.76;
  color: var(--text-mid);
  max-width: 60ch;
}
.about__text .section__title { margin-bottom: 1.3rem; }

.about__facts {
  position: sticky;
  top: 92px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: clamp(1.5rem, 3vw, 1.9rem);
}

/* ---------- Contact ---------- */

.section--contact {
  background:
    radial-gradient(ellipse 70% 100% at 50% 0%, var(--accent-wash), transparent 62%),
    var(--bg-alt);
  border-top: 1px solid var(--line-soft);
  text-align: center;
}
.contact { max-width: 720px; }
.contact .eyebrow { margin-inline: auto; }
.contact__title { font-size: clamp(2.05rem, 5.2vw, 3.15rem); }
.contact__lede { margin-inline: auto; }
.contact__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.8rem;
  margin-top: 2.1rem;
}

/* ---------- Footer ---------- */

.footer {
  padding-block: 2.1rem;
  border-top: 1px solid var(--line-soft);
  background: var(--bg);
}
.footer__inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
}
.footer p { margin: 0; font-size: 0.86rem; color: var(--text-dim); }
.footer a { color: var(--text-mid); transition: color .2s var(--ease); }
.footer a:hover { color: var(--accent); }

/* ---------- Reveal on scroll ---------- */

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .7s var(--ease) var(--d, 0ms),
              transform .7s var(--ease) var(--d, 0ms);
}
.reveal.is-in { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */

@media (max-width: 900px) {
  .about { grid-template-columns: 1fr; }
  .about__facts { position: static; }
}

@media (max-width: 640px) {
  body { font-size: 16px; }
  html { scroll-padding-top: 78px; }
  .nav__inner { height: 60px; }
  .nav__links { display: none; }
  .mark__text { font-size: 0.9rem; }
  .app-grid { grid-template-columns: 1fr; }
  .btn { width: 100%; }
  .hero__actions .btn, .contact__actions .btn { flex: 1 1 100%; }
  /* Stack the QR above the button rather than squeezing them side by side. */
  .getapp { flex-direction: column; align-items: stretch; gap: 1rem; }
  .getapp__qr { align-self: center; }
  .getapp__cta { align-items: stretch; text-align: center; }
  .spec > div { flex-direction: column; align-items: flex-start; gap: 0.15rem; }
  .spec dd { text-align: left; }
}

/* ---------- Motion & print ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}

@media print {
  .nav, .theme-toggle, .hero__grid, .skip-link { display: none !important; }
  body { background: #fff; color: #000; font-size: 11pt; }
  .appcard, .about__facts { break-inside: avoid; box-shadow: none; }
  .reveal { opacity: 1 !important; transform: none !important; }
}
