:root {
  --midnight: #0B1028;
  --night: #141D3A;
  --night-2: #1B2548;
  --white: #FFFFFF;
  --mist: #B6C5E8;
  --mist-dim: #7F8DB3;
  --lime: #C4FA72;
  --sky: #56C8F2;
  --coral: #FF8275;
  --line: rgba(182, 197, 232, 0.14);
  --radius: 18px;
  --max: 1120px;
  --font-display: "Bricolage Grotesque", system-ui, sans-serif;
  --font-body: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
#revolving { scroll-margin-top: 16px; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--midnight);
  color: var(--white);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
body::before { /* faint terminal grid */
  content: "";
  position: fixed; inset: 0;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse at 50% 30%, rgba(0,0,0,.55), transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 30%, rgba(0,0,0,.55), transparent 70%);
  pointer-events: none;
  z-index: 0;
}
main, header, footer { position: relative; z-index: 1; }
a { color: var(--sky); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
:focus-visible { outline: 2px solid var(--lime); outline-offset: 3px; border-radius: 6px; }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 24px; }

/* Header */
.site-header { border-bottom: 1px solid var(--line); position: relative; z-index: 50; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 76px; gap: 16px; }
.brand-link img { height: 34px; width: auto; }
.nav { display: flex; gap: 6px; }
.nav a {
  color: var(--mist); font-size: 15px; font-weight: 500;
  padding: 8px 14px; border-radius: 999px;
}
.nav a:hover { color: var(--white); background: var(--night); text-decoration: none; }
.nav a[aria-current="page"] { color: var(--midnight); background: var(--lime); }

main { flex: 1; }

/* Typography */
h1, h2, h3 { font-family: var(--font-display); font-weight: 800; letter-spacing: -0.02em; line-height: 1.05; margin: 0; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
  font-size: 13px; letter-spacing: .08em; text-transform: uppercase;
  color: var(--lime);
}
.eyebrow::before { content: ">"; font-weight: 700; }
.lead { color: var(--mist); font-size: 20px; max-width: 640px; }
.muted { color: var(--mist-dim); }

/* Hero (coming soon) */
.hero { padding: 96px 0 72px; }
.hero h1 { font-size: clamp(46px, 8vw, 96px); margin: 22px 0 26px; }
.cursor { display: inline-flex; gap: .12em; margin-left: .18em; vertical-align: -0.02em; }
.cursor i { display: block; width: .34em; height: .34em; border-radius: .09em; animation: blink 1.2s steps(1) infinite; }
.cursor i:nth-child(1) { background: var(--lime); }
.cursor i:nth-child(2) { background: var(--sky); animation-delay: .15s; }
.cursor i:nth-child(3) { background: var(--coral); animation-delay: .3s; }
@keyframes blink { 0%, 60% { opacity: 1; } 61%, 100% { opacity: .15; } }
@media (prefers-reduced-motion: reduce) { .cursor i { animation: none; } }

.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font: 600 16px/1 var(--font-body);
  padding: 15px 22px; border-radius: 12px; border: 1px solid transparent;
  cursor: pointer; transition: transform .12s ease, background .12s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: var(--lime); color: var(--midnight); }
.btn-primary:hover { background: #d3ff8f; }
.btn-ghost { background: transparent; color: var(--white); border-color: var(--line); }
.btn-ghost:hover { background: var(--night); }
.btn[disabled] { opacity: .6; cursor: progress; transform: none; }

/* Terminal card */
.terminal {
  margin-top: 64px; background: var(--night); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden; max-width: 760px;
  box-shadow: 0 30px 80px -30px rgba(0,0,0,.6);
}
.terminal-bar { display: flex; gap: 8px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.terminal-bar span { width: 12px; height: 12px; border-radius: 4px; }
.terminal-bar span:nth-child(1) { background: var(--lime); }
.terminal-bar span:nth-child(2) { background: var(--sky); }
.terminal-bar span:nth-child(3) { background: var(--coral); }
.terminal pre {
  margin: 0; padding: 22px 22px 26px; overflow-x: auto;
  font: 14.5px/1.8 ui-monospace, "SFMono-Regular", Menlo, monospace; color: var(--mist);
}
.terminal .p { color: var(--lime); }
.terminal .k { color: var(--white); }
.terminal .s { color: var(--sky); }
.terminal .c { color: var(--coral); }

/* Sections / grids */
.section { padding: 72px 0; border-top: 1px solid var(--line); }
.section-head { margin-bottom: 36px; }
.section-head h2 { font-size: clamp(32px, 5vw, 48px); margin-top: 14px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.card { background: var(--night); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; }
.card h3 { font-size: 22px; margin-bottom: 10px; }
.card p { margin: 0; color: var(--mist); font-size: 16px; }
.tile { width: 22px; height: 22px; border-radius: 6px; margin-bottom: 18px; }

/* Revolving section */
.rv-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: 48px; align-items: center; }
.rv-logo { display: block; width: fit-content; margin: 18px 0 8px; }
.rv-logo img { width: 260px; height: auto; }
.rv-lead { color: var(--mist); font-size: 19px; max-width: 480px; margin: 8px 0 22px; }
.rv-stats { list-style: none; padding: 0; margin: 0 0 24px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; max-width: 480px; }
.rv-stats li { background: var(--night); border: 1px solid var(--line); border-radius: 16px; padding: 16px 18px; }
.rv-stats b { display: block; font-family: var(--font-display); font-size: 48px; line-height: 1; letter-spacing: -.02em; color: var(--white); font-variant-numeric: tabular-nums; }
.rv-stats span { display: block; margin-top: 6px; color: var(--mist); font-size: 14px; }
.rv-stats .c-lime b { color: var(--lime); }
.rv-stats .c-sky b { color: var(--sky); }
.rv-stats .c-coral b { color: var(--coral); }
.rv-links { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.rv-links a { display: inline-block; font-size: 14px; font-weight: 500; color: var(--white); padding: 8px 12px; border: 1px solid var(--line); border-radius: 999px; }
.rv-links a:hover { border-color: var(--lime); color: var(--lime); text-decoration: none; }
.rv-games { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.rv-game { display: block; background: var(--night); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; color: var(--mist); transition: transform .15s ease, border-color .15s ease; }
.rv-game:hover { transform: translateY(-3px); border-color: var(--sky); text-decoration: none; }
.rv-game img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: var(--night-2); }
.rv-game span { display: block; padding: 10px 14px 14px; font-size: 13px; }
.rv-game b { display: block; color: var(--white); font-size: 15px; letter-spacing: .02em; }
@media (max-width: 900px) { .rv-grid { grid-template-columns: 1fr; gap: 32px; } }
@media (max-width: 560px) { .rv-logo img { width: 200px; } .rv-stats b { font-size: 38px; } }

/* Page header */
.page-head { padding: 80px 0 48px; }
.page-head h1 { font-size: clamp(44px, 7vw, 80px); margin: 18px 0 18px; }

/* Contact */
.contact-single { grid-template-columns: 1fr !important; }
/* Contact page: centered heading, form spans the full content width */
.page-contact .page-head { text-align: center; }
.page-contact .page-head .lead { margin-left: auto; margin-right: auto; max-width: 760px; }
.page-contact .contact-single .card { padding: clamp(24px, 4vw, 48px); }
.contact-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 24px; align-items: start; padding-bottom: 96px; }
form.card { padding: 32px; }
.field { display: flex; flex-direction: column; gap: 8px; margin-bottom: 18px; }
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
label { font-size: 14px; font-weight: 600; color: var(--mist); }
input, select, textarea {
  width: 100%; font: 16px/1.4 var(--font-body); color: var(--white);
  background: var(--midnight); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px;
}
input::placeholder, textarea::placeholder { color: var(--mist-dim); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--lime); box-shadow: 0 0 0 3px rgba(196,250,114,.18); }
textarea { min-height: 160px; resize: vertical; }
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--mist) 50%), linear-gradient(135deg, var(--mist) 50%, transparent 50%); background-position: calc(100% - 22px) 55%, calc(100% - 16px) 55%; background-size: 6px 6px; background-repeat: no-repeat; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-status { margin-top: 16px; font-size: 15px; min-height: 1.4em; }
.form-status.ok { color: var(--lime); }
.form-status.err { color: var(--coral); }
.info-list { list-style: none; padding: 0; margin: 0; }
.info-list li { padding: 16px 0; border-bottom: 1px solid var(--line); }
.info-list li:last-child { border-bottom: 0; }
.info-list .label { display: block; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--mist-dim); margin-bottom: 4px; }

/* Brand */
.asset { display: flex; flex-direction: column; gap: 16px; }
.asset-preview {
  border-radius: 14px; border: 1px solid var(--line); min-height: 200px;
  display: grid; place-items: center; padding: 32px;
}
.asset-preview.dark { background: var(--midnight); }
.asset-preview.light { background: #FFFFFF; }
.asset-preview.checker {
  background-color: #1a2346;
  background-image: linear-gradient(45deg, #212b52 25%, transparent 25%), linear-gradient(-45deg, #212b52 25%, transparent 25%), linear-gradient(45deg, transparent 75%, #212b52 75%), linear-gradient(-45deg, transparent 75%, #212b52 75%);
  background-size: 20px 20px; background-position: 0 0, 0 10px, 10px -10px, -10px 0;
}
.asset-preview img.logo { width: 100%; max-width: 420px; }
.asset-preview img.icon { width: 120px; height: 120px; }
.asset-meta { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.asset-meta strong { font-size: 16px; }
.dl { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  font: 600 13px/1 var(--font-body); color: var(--white); padding: 9px 12px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--midnight);
}
.chip:hover { border-color: var(--lime); color: var(--lime); text-decoration: none; }
.icon-sizes { display: flex; align-items: flex-end; gap: 22px; flex-wrap: wrap; }
.icon-sizes figure { margin: 0; text-align: center; font-size: 12px; color: var(--mist-dim); }
.icon-sizes img { margin: 0 auto 8px; }

.swatches { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.swatch { border-radius: 14px; overflow: hidden; border: 1px solid var(--line); background: var(--night); }
.swatch .chipcolor { height: 96px; }
.swatch .info { padding: 12px 14px; font-size: 14px; }
.swatch .info b { display: block; }
.swatch button {
  all: unset; cursor: pointer; font-family: ui-monospace, Menlo, monospace; color: var(--mist); font-size: 13px;
}
.swatch button:hover { color: var(--lime); }
.swatch .use { color: var(--mist-dim); font-size: 12.5px; margin-top: 4px; line-height: 1.4; }

.type-sample { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.type-sample .display { font-family: var(--font-display); font-weight: 800; font-size: 56px; line-height: 1; letter-spacing: -0.02em; margin: 12px 0; }
.type-sample .body { font-size: 22px; margin: 12px 0; }

.rules { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.rules ul { margin: 0; padding-left: 20px; color: var(--mist); }
.rules li { margin: 8px 0; }
.do h3 { color: var(--lime); }
.dont h3 { color: var(--coral); }

.download-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap;
  background: var(--night); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 26px;
}

/* Footer */
.parent-co { display: inline-flex; align-items: center; gap: 8px; margin-top: 6px; color: var(--mist-dim); }
.parent-co:hover { text-decoration: none; }
.parent-label { font-size: 13px; color: var(--mist); }
.holding-horizontal { display: inline-flex; align-items: center; gap: 7px; color: var(--white); font-size: 13px; font-weight: 300; letter-spacing: .6px; line-height: 1; }
.holding-horizontal i { display: block; width: 15px; height: 15px; background: url("/assets/palella/palella-holdings-icon-white.png") center / contain no-repeat; }
.holding-horizontal b { font-weight: 600; }
.parent-co:hover .holding-horizontal { opacity: .85; }
.parent-go { margin-left: auto; font-size: 14px; color: var(--mist); }
.parent-co:hover .parent-go { color: var(--lime); }
@media (max-width: 560px) { .parent-go { margin-left: 0; width: 100%; } }
.site-footer { border-top: 1px solid var(--line); padding: 36px 0 48px; color: var(--mist-dim); font-size: 14px; }
.footer-grid { display: flex; justify-content: space-between; align-items: center; gap: 32px; flex-wrap: wrap; }
.footer-id { display: flex; gap: 16px; align-items: center; }
.footer-id img { width: 52px; height: 52px; flex: none; }
.footer-id strong { color: var(--white); font-size: 15px; display: block; }
.footer-id p { margin: 2px 0; line-height: 1.5; }
.footer-links { display: flex; gap: 22px; flex-wrap: wrap; align-items: flex-start; }
.footer-links a { color: var(--mist); }
.footer-bottom { margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(20px);
  background: var(--lime); color: var(--midnight); font-weight: 600; font-size: 14px;
  padding: 10px 16px; border-radius: 10px; opacity: 0; transition: all .2s ease; z-index: 10; pointer-events: none;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* Responsive */
@media (max-width: 900px) {
  .grid-3 { grid-template-columns: 1fr; }
  .contact-grid, .grid-2, .type-sample, .rules { grid-template-columns: 1fr; }
  .swatches { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .wrap { padding: 0 16px; }
  .site-header .wrap { height: 64px; }
  .brand-link img { height: 26px; }
  .hero { padding: 56px 0 48px; }
  .lead { font-size: 18px; }
  .row-2 { grid-template-columns: 1fr; }
  .terminal pre { font-size: 13px; }
  .type-sample .display { font-size: 42px; }
}

/* Mobile footer: links stacked under the PH Tech Hub logo, left aligned */
@media (max-width: 700px) {
  .footer-grid { flex-direction: column; align-items: flex-start; gap: 18px; }
  .footer-links { justify-content: flex-start; }
}

/* Mobile menu: three-dot toggle + dropdown panel */
.nav-toggle { display: none; }
@media (max-width: 700px) {
  .nav-toggle {
    display: inline-flex; align-items: center; justify-content: center; gap: 5px;
    width: 44px; height: 44px; margin-right: -8px; padding: 0; border: 0; border-radius: 12px;
    background: transparent; cursor: pointer;
  }
  .nav-toggle i { width: 7px; height: 7px; border-radius: 2px; background: var(--lime); transition: transform .2s ease; }
  .nav-toggle i:nth-child(2) { background: var(--sky); }
  .nav-toggle i:nth-child(3) { background: var(--coral); }
  .nav-toggle:hover, .menu-open .nav-toggle { background: var(--night); }
  .menu-open .nav-toggle i:nth-child(1) { transform: translateY(-4px); }
  .menu-open .nav-toggle i:nth-child(3) { transform: translateY(4px); }
  .nav {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; gap: 4px; padding: 10px 16px 16px;
    background: var(--midnight); border-bottom: 1px solid var(--line);
    box-shadow: 0 18px 40px rgba(0, 0, 0, .35);
    opacity: 0; visibility: hidden; transform: translateY(-6px);
    transition: opacity .18s ease, transform .18s ease, visibility 0s linear .18s;
  }
  .menu-open .nav { opacity: 1; visibility: visible; transform: none; transition: opacity .18s ease, transform .18s ease; }
  .nav a { display: block; padding: 14px 16px; font-size: 17px; border-radius: 12px; }
}

/* PalTicker section: sober finance styling in PalTicker brand colors */
.pt-panel { --pt-navy:#0B1B2B; --pt-cobalt:#2F5BFF; --pt-paper:#F6F5F1; --pt-mist:#B8C2CE;
  background: var(--pt-navy); border: 1px solid rgba(184,194,206,.18); border-radius: 20px;
  display: grid; grid-template-columns: 1.25fr 1fr; gap: 40px 56px; padding: clamp(28px,4.5vw,56px); position: relative; overflow: hidden; }
.pt-panel::before { content:""; position:absolute; inset:0; pointer-events:none;
  background-image: linear-gradient(rgba(184,194,206,.06) 1px, transparent 1px), linear-gradient(90deg, rgba(184,194,206,.06) 1px, transparent 1px);
  background-size: 56px 56px; mask-image: linear-gradient(90deg, transparent 0%, #000 55%, #000 100%); }
.pt-panel > * { position: relative; }
.pt-eyebrow { font: 500 12px/1 ui-monospace, "SFMono-Regular", Menlo, monospace; letter-spacing: .14em; text-transform: uppercase; color: var(--pt-mist); }
.pt-logo { display:block; width: fit-content; margin: 22px 0 26px; }
.pt-logo img { width: 280px; height: auto; }
.pt-title { font-size: clamp(28px, 3.4vw, 40px); color: #fff; letter-spacing: -0.02em; max-width: 560px; }
.pt-lead { color: var(--pt-mist); font-size: 17px; line-height: 1.6; max-width: 560px; margin: 16px 0 28px; }
.pt-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.pt-btn { display: inline-flex; align-items: center; height: 46px; padding: 0 20px; border-radius: 8px; font-weight: 600; font-size: 15px; }
.pt-btn:hover { text-decoration: none; }
.pt-btn-primary { background: var(--pt-cobalt); color: #fff; }
.pt-btn-primary:hover { background: #2450e6; }
.pt-btn-ghost { color: #fff; border: 1px solid rgba(184,194,206,.35); }
.pt-btn-ghost:hover { border-color: #fff; }
.pt-side { align-self: center; }
.pt-modules { list-style: none; margin: 0; padding: 0; border-top: 1px solid rgba(184,194,206,.18); }
.pt-modules li { display: grid; grid-template-columns: 14px 1fr; column-gap: 14px; padding: 16px 0; border-bottom: 1px solid rgba(184,194,206,.18); }
.pt-modules b { color: #fff; font-size: 16px; font-weight: 600; }
.pt-modules em { grid-column: 2; font-style: normal; color: var(--pt-mist); font-size: 14px; margin-top: 2px; }
.pt-up { width: 0; height: 0; margin-top: 5px; border-left: 6px solid transparent; border-right: 6px solid transparent; border-bottom: 10px solid var(--pt-cobalt); }
.pt-facts { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(4, 1fr); margin: 0; border-top: 1px solid rgba(184,194,206,.18); padding-top: 22px; gap: 20px; }
.pt-facts dt { font: 500 11px/1 ui-monospace, "SFMono-Regular", Menlo, monospace; letter-spacing: .14em; text-transform: uppercase; color: var(--pt-mist); margin-bottom: 8px; }
.pt-facts dd { margin: 0; color: #fff; font-size: 15px; font-weight: 500; display: flex; align-items: center; gap: 8px; }
.pt-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--pt-cobalt); box-shadow: 0 0 0 3px rgba(47,91,255,.25); }
@media (max-width: 900px) { .pt-panel { grid-template-columns: 1fr; } .pt-facts { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .pt-logo img { width: 220px; } }
