/* PresentSync Design Tokens
 * Brand: clean professional SaaS — white base, black text, soft borders,
 * PresentSync orange as accent, light blue for Personal, gold for Pro.
 * Restrained: no gradients, no glow, no tech-light effects.
 */

:root {
  /* ---------- Color ---------- */
  /* Neutrals */
  --ps-white:        #FFFFFF;
  --ps-ink:          #0B0B0F;     /* primary text, primary button */
  --ps-ink-2:        #1A1A22;
  --ps-text:         #14141A;
  --ps-text-2:       #4A4A55;     /* secondary text */
  --ps-text-3:       #6E6E78;     /* tertiary, meta */
  --ps-text-4:       #9A9AA3;     /* placeholder */
  --ps-line:         #E6E6EA;     /* default border */
  --ps-line-2:       #EFEFF2;     /* subtle divider */
  --ps-line-3:       #D6D6DC;     /* emphasized border */
  --ps-bg:           #FFFFFF;
  --ps-bg-soft:      #FAFAFB;     /* section break */
  --ps-bg-sunken:    #F5F5F7;     /* slightly deeper */
  --ps-bg-code:      #F2F2F4;

  /* Brand orange — PresentSync */
  --ps-orange:       #F26B1F;
  --ps-orange-600:   #DB5C12;
  --ps-orange-50:    #FFF1E7;
  --ps-orange-100:   #FFE0CB;

  /* Personal — soft blue */
  --ps-blue:         #2E7CF6;
  --ps-blue-600:     #1E63D2;
  --ps-blue-50:      #EAF2FE;
  --ps-blue-100:     #D3E2FC;

  /* Pro — refined gold */
  --ps-gold:         #B8862E;
  --ps-gold-600:     #936B22;
  --ps-gold-50:      #FBF3E2;
  --ps-gold-100:     #F4E3B8;

  /* Status */
  --ps-green:        #1F9D55;
  --ps-green-50:     #E6F5EC;
  --ps-amber:        #C98A12;
  --ps-amber-50:     #FBF1DC;
  --ps-red:          #C8362B;
  --ps-red-50:       #FCEAE8;

  /* ---------- Type ---------- */
  --font-sans: "Inter", "Noto Sans SC", "Noto Sans TC", "Noto Sans JP",
               -apple-system, BlinkMacSystemFont, "PingFang SC",
               "Hiragino Sans", "Microsoft YaHei", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  /* Type scale */
  --t-xs:    12px;
  --t-sm:    13px;
  --t-base:  15px;
  --t-md:    16px;
  --t-lg:    18px;
  --t-xl:    20px;
  --t-2xl:   24px;
  --t-3xl:   30px;
  --t-4xl:   38px;
  --t-5xl:   48px;
  --t-6xl:   60px;
  --t-7xl:   76px;

  /* ---------- Space ---------- */
  --s-1: 4px;
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-5: 20px;
  --s-6: 24px;
  --s-8: 32px;
  --s-10: 40px;
  --s-12: 48px;
  --s-16: 64px;
  --s-20: 80px;
  --s-24: 96px;
  --s-32: 128px;

  /* ---------- Radius ---------- */
  --r-xs: 4px;
  --r-sm: 6px;
  --r-md: 8px;
  --r-lg: 12px;
  --r-xl: 16px;
  --r-pill: 999px;

  /* ---------- Shadow ---------- */
  --sh-1: 0 1px 2px rgba(15, 15, 25, 0.04);
  --sh-2: 0 2px 8px rgba(15, 15, 25, 0.06), 0 1px 2px rgba(15, 15, 25, 0.04);
  --sh-3: 0 12px 32px rgba(15, 15, 25, 0.08), 0 2px 6px rgba(15, 15, 25, 0.04);
  --sh-4: 0 28px 64px rgba(15, 15, 25, 0.12), 0 4px 12px rgba(15, 15, 25, 0.06);

  /* ---------- Layout ---------- */
  --container: 1200px;
  --container-narrow: 880px;
  --nav-h: 64px;
}

/* ---------- Base ---------- */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--t-base);
  line-height: 1.55;
  color: var(--ps-text);
  background: var(--ps-bg);
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; }
img, svg { display: block; max-width: 100%; }

/* ---------- Container ---------- */
.ps-container { max-width: var(--container); margin: 0 auto; padding: 0 32px; }
.ps-container-narrow { max-width: var(--container-narrow); margin: 0 auto; padding: 0 32px; }
@media (max-width: 720px) {
  .ps-container, .ps-container-narrow { padding: 0 20px; }
}

/* ---------- Type utilities ---------- */
.t-eyebrow {
  font-size: var(--t-xs);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ps-text-3);
}
.t-eyebrow.orange { color: var(--ps-orange-600); }
.t-h1 {
  font-size: clamp(40px, 5.4vw, 64px);
  line-height: 1.05;
  letter-spacing: -0.025em;
  font-weight: 700;
  color: var(--ps-ink);
  margin: 0;
  text-wrap: balance;
}
.t-h2 {
  font-size: clamp(28px, 3.4vw, 44px);
  line-height: 1.1;
  letter-spacing: -0.02em;
  font-weight: 700;
  color: var(--ps-ink);
  margin: 0;
  text-wrap: balance;
}
.t-h3 {
  font-size: clamp(20px, 2.2vw, 26px);
  line-height: 1.2;
  letter-spacing: -0.01em;
  font-weight: 600;
  color: var(--ps-ink);
  margin: 0;
}
.t-h4 {
  font-size: var(--t-lg);
  line-height: 1.3;
  font-weight: 600;
  color: var(--ps-ink);
  margin: 0;
}
.t-lead {
  font-size: clamp(16px, 1.6vw, 19px);
  line-height: 1.55;
  color: var(--ps-text-2);
  margin: 0;
  text-wrap: pretty;
}
.t-body { font-size: var(--t-base); color: var(--ps-text-2); line-height: 1.65; }
.t-meta { font-size: var(--t-sm); color: var(--ps-text-3); }
.t-mono { font-family: var(--font-mono); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 44px;
  padding: 0 18px;
  border-radius: var(--r-md);
  font-size: var(--t-base);
  font-weight: 600;
  letter-spacing: -0.005em;
  border: 1px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: background .15s, border-color .15s, color .15s, transform .08s;
  user-select: none;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: var(--ps-ink);
  color: var(--ps-white);
  border-color: var(--ps-ink);
}
.btn-primary:hover { background: #25252E; border-color: #25252E; }
.btn-secondary {
  background: var(--ps-white);
  color: var(--ps-ink);
  border-color: var(--ps-line-3);
}
.btn-secondary:hover { background: var(--ps-bg-soft); border-color: var(--ps-text-3); }
.btn-orange {
  background: var(--ps-orange);
  color: #fff;
  border-color: var(--ps-orange);
}
.btn-orange:hover { background: var(--ps-orange-600); border-color: var(--ps-orange-600); }
.btn-ghost { background: transparent; color: var(--ps-ink); border-color: transparent; }
.btn-ghost:hover { background: var(--ps-bg-sunken); }
.btn-sm { height: 36px; padding: 0 14px; font-size: var(--t-sm); }
.btn-lg { height: 52px; padding: 0 24px; font-size: var(--t-md); }
.btn[disabled], .btn[aria-disabled="true"] {
  opacity: 0.55; cursor: not-allowed; pointer-events: none;
}

/* ---------- Tags / Badges ---------- */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 22px;
  padding: 0 8px;
  border-radius: var(--r-xs);
  font-size: var(--t-xs);
  font-weight: 600;
  letter-spacing: 0.01em;
  background: var(--ps-bg-sunken);
  color: var(--ps-text-2);
  border: 1px solid var(--ps-line);
}
.tag-dot { width: 6px; height: 6px; border-radius: 999px; background: currentColor; }
.tag.orange   { background: var(--ps-orange-50); color: var(--ps-orange-600); border-color: var(--ps-orange-100); }
.tag.blue     { background: var(--ps-blue-50);   color: var(--ps-blue-600);   border-color: var(--ps-blue-100); }
.tag.gold     { background: var(--ps-gold-50);   color: var(--ps-gold-600);   border-color: var(--ps-gold-100); }
.tag.green    { background: var(--ps-green-50);  color: var(--ps-green);      border-color: #CBE9D6; }
.tag.amber    { background: var(--ps-amber-50);  color: var(--ps-amber);      border-color: #F0DDA8; }
.tag.gray     { background: var(--ps-bg-sunken); color: var(--ps-text-2);     border-color: var(--ps-line); }

/* Status: available / coming-soon / in-review / unavailable */
.status {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: var(--t-xs); font-weight: 600;
  padding: 4px 10px; border-radius: var(--r-pill);
  border: 1px solid;
}
.status .dot { width: 6px; height: 6px; border-radius: 999px; }
.status-available  { color: var(--ps-green);  border-color: #CBE9D6; background: var(--ps-green-50); }
.status-available .dot { background: var(--ps-green); }
.status-soon       { color: var(--ps-amber);  border-color: #F0DDA8; background: var(--ps-amber-50); }
.status-soon .dot  { background: var(--ps-amber); }
.status-review     { color: var(--ps-text-2); border-color: var(--ps-line); background: var(--ps-bg-soft); }
.status-review .dot{ background: var(--ps-text-3); }
.status-beta       { color: var(--ps-blue-600); border-color: var(--ps-blue-100); background: var(--ps-blue-50); }
.status-beta .dot  { background: var(--ps-blue); }

/* ---------- Cards ---------- */
.card {
  background: var(--ps-white);
  border: 1px solid var(--ps-line);
  border-radius: var(--r-lg);
  padding: 24px;
}
.card-soft {
  background: var(--ps-bg-soft);
  border: 1px solid var(--ps-line);
  border-radius: var(--r-lg);
  padding: 24px;
}
hr.ps-hr { border: 0; border-top: 1px solid var(--ps-line); margin: 0; }

/* ---------- Header / Footer (shared) ---------- */
.ps-header {
  position: sticky; top: 0; z-index: 40;
  background: rgba(255,255,255,0.92);
  backdrop-filter: saturate(150%) blur(8px);
  border-bottom: 1px solid var(--ps-line);
}
.ps-header-inner {
  height: var(--nav-h);
  display: flex; align-items: center; gap: 24px;
}
.ps-logo {
  display: inline-flex; align-items: center; gap: 10px;
  font-weight: 700; color: var(--ps-ink); font-size: 17px;
  letter-spacing: -0.01em;
}
.ps-logo-mark {
  width: 26px; height: 26px; border-radius: 7px;
  background: var(--ps-ink);
  display: grid; place-items: center;
  position: relative;
}
.ps-logo-mark::before,
.ps-logo-mark::after {
  content: ""; position: absolute; border-radius: 1.5px; background: #fff;
}
.ps-logo-mark::before {
  width: 12px; height: 8px; border: 1.5px solid #fff; background: transparent;
  border-radius: 1.5px;
  top: 6px; left: 7px;
}
.ps-logo-mark::after {
  width: 4px; height: 6px; background: var(--ps-orange); border-radius: 1px;
  bottom: 5px; left: 11px;
}
.ps-nav {
  display: flex; align-items: center; gap: 4px;
  margin-left: 12px;
}
.ps-nav a {
  padding: 8px 12px;
  font-size: var(--t-sm);
  font-weight: 500;
  color: var(--ps-text-2);
  border-radius: 6px;
}
.ps-nav a:hover { background: var(--ps-bg-sunken); color: var(--ps-ink); }
.ps-nav a.active { color: var(--ps-ink); }
.ps-header-spacer { flex: 1; }
.ps-header-actions { display: flex; align-items: center; gap: 8px; }
.ps-lang-select {
  height: 36px; padding: 0 28px 0 12px;
  font-size: var(--t-sm); font-weight: 500; color: var(--ps-text-2);
  background: transparent
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'><path d='M3 4.5l3 3 3-3' stroke='%236E6E78' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/></svg>")
    no-repeat right 10px center;
  border: 1px solid var(--ps-line);
  border-radius: 6px;
  appearance: none;
}
.ps-mobile-toggle { display: none; }
@media (max-width: 960px) {
  .ps-nav { display: none; }
  .ps-mobile-toggle {
    display: inline-flex; align-items: center; justify-content: center;
    width: 36px; height: 36px; border-radius: 6px;
    background: transparent; border: 1px solid var(--ps-line);
    cursor: pointer;
  }
  .ps-lang-select { display: none; }
  .ps-cta-download-text { display: none; }
}

.ps-mobile-drawer {
  display: none;
  position: fixed; left: 0; right: 0; top: var(--nav-h);
  background: #fff; border-bottom: 1px solid var(--ps-line);
  padding: 12px 20px 20px;
  z-index: 39;
}
.ps-mobile-drawer.open { display: block; }
.ps-mobile-drawer a {
  display: block; padding: 12px 4px;
  border-bottom: 1px solid var(--ps-line-2);
  font-size: 15px; font-weight: 500; color: var(--ps-text);
}
.ps-mobile-drawer a:last-of-type { border-bottom: 0; }
.ps-mobile-drawer .btn { width: 100%; margin-top: 12px; }

/* Footer */
.ps-footer {
  border-top: 1px solid var(--ps-line);
  background: var(--ps-bg-soft);
  padding: 56px 0 32px;
  margin-top: 80px;
}
.ps-footer-grid {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 40px;
}
.ps-footer-brand p {
  color: var(--ps-text-2); font-size: var(--t-sm);
  margin: 12px 0 0; max-width: 260px;
}
.ps-footer h5 {
  margin: 0 0 16px; font-size: 14px; font-weight: 700;
  letter-spacing: -0.005em; text-transform: none; color: var(--ps-ink);
}
.ps-footer ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.ps-footer a { color: var(--ps-text-3); font-size: var(--t-sm); }
.ps-footer a:hover { color: var(--ps-ink); }
.ps-footer-bottom {
  margin-top: 48px; padding-top: 24px;
  border-top: 1px solid var(--ps-line);
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  flex-wrap: wrap;
  color: var(--ps-text-3); font-size: var(--t-xs);
}
@media (max-width: 720px) {
  .ps-footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .ps-footer-brand { grid-column: 1 / -1; }
}

/* ---------- Section helpers ---------- */
.section { padding: 80px 0; }
.section-sm { padding: 56px 0; }
.section-lg { padding: 112px 0; }
@media (max-width: 720px) {
  .section { padding: 56px 0; }
  .section-lg { padding: 72px 0; }
}
.section-soft { background: var(--ps-bg-soft); }
.section-dark { background: var(--ps-ink); color: #fff; }
.section-dark .t-h2,
.section-dark .t-h1 { color: #fff; }
.section-dark .t-lead { color: rgba(255,255,255,0.7); }

/* ---------- Misc ---------- */
.kbd {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 4px;
  background: var(--ps-bg-sunken);
  border: 1px solid var(--ps-line);
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ps-text-2);
}
.divider-dot { width: 3px; height: 3px; border-radius: 999px; background: var(--ps-text-4); display: inline-block; vertical-align: middle; }

/* ---------- Hide focus rings on mouse, keep for keyboard ---------- */
:focus-visible { outline: 2px solid var(--ps-orange); outline-offset: 2px; border-radius: 4px; }
:focus:not(:focus-visible) { outline: none; }
