/* ============================================================
   Yoris Design System — Apple Human Interface
   ============================================================
   Tokens from DESIGN.md (Apple-design-analysis)
   Single accent: Action Blue #0066cc
   No decorative shadows, no gradients — photography is king
   ============================================================ */

/* ---- Design Tokens ---- */
:root {
    /* Brand */
    --blue: #0066cc;
    --blue-focus: #0071e3;
    --blue-on-dark: #2997ff;

    /* Surface */
    --canvas: #ffffff;
    --parchment: #f5f5f7;
    --pearl: #fafafc;
    --tile-1: #272729;
    --tile-2: #2a2a2c;
    --tile-3: #252527;
    --black: #000000;

    /* Text */
    --ink: #1d1d1f;
    --ink-muted: #333333;
    --ink-faded: #7a7a7a;
    --on-dark: #ffffff;
    --on-dark-muted: #cccccc;

    /* Lines */
    --hairline: #e0e0e0;
    --divider: #f0f0f0;

    /* Radius */
    --radius-xs: 5px;
    --radius-sm: 8px;
    --radius-md: 11px;
    --radius-lg: 18px;
    --radius-pill: 9999px;

    /* Spacing (8px grid) */
    --space-xs: 8px;
    --space-sm: 12px;
    --space-md: 17px;
    --space-lg: 24px;
    --space-xl: 32px;
    --space-xxl: 48px;
    --space-section: 80px;

    /* Product shadow (ONLY for imagery, never on UI chrome) */
    --product-shadow: 3px 5px 30px rgba(0, 0, 0, 0.22);
}

/* ---- Reset ---- */
*,
*::before,
*::after { margin: 0; padding: 0; box-sizing: border-box; }

html { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }

body {
    font-family: "SF Pro Text", system-ui, -apple-system, BlinkMacSystemFont,
                 "Inter", "PingFang SC", "Microsoft YaHei", sans-serif;
    font-size: 17px;
    font-weight: 400;
    line-height: 1.47;
    letter-spacing: -0.374px;
    color: var(--ink);
    background: var(--parchment);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ---- Typography ---- */
h1, .hero-display {
    font-family: "SF Pro Display", system-ui, -apple-system, sans-serif;
    font-size: 56px;
    font-weight: 600;
    line-height: 1.07;
    letter-spacing: -0.28px;
}

.display-lg {
    font-family: "SF Pro Display", system-ui, -apple-system, sans-serif;
    font-size: 40px;
    font-weight: 600;
    line-height: 1.10;
    letter-spacing: 0;
}

.display-md {
    font-family: "SF Pro Text", system-ui, -apple-system, sans-serif;
    font-size: 34px;
    font-weight: 600;
    line-height: 1.47;
    letter-spacing: -0.374px;
}

.lead {
    font-family: "SF Pro Display", system-ui, -apple-system, sans-serif;
    font-size: 28px;
    font-weight: 400;
    line-height: 1.14;
    letter-spacing: 0.196px;
}

.tagline {
    font-family: "SF Pro Display", system-ui, -apple-system, sans-serif;
    font-size: 21px;
    font-weight: 600;
    line-height: 1.19;
    letter-spacing: 0.231px;
}

.body-strong {
    font-size: 17px;
    font-weight: 600;
    line-height: 1.24;
    letter-spacing: -0.374px;
}

.caption {
    font-size: 14px;
    font-weight: 400;
    line-height: 1.43;
    letter-spacing: -0.224px;
}

.caption-strong {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.29;
    letter-spacing: -0.224px;
}

.fine-print {
    font-size: 12px;
    font-weight: 400;
    line-height: 1.0;
    letter-spacing: -0.12px;
}

/* ---- Global Nav ---- */
.global-nav {
    background: var(--black);
    color: var(--on-dark);
    height: 44px;
    position: sticky;
    top: 0;
    z-index: 100;
    font-size: 12px;
    font-weight: 400;
    letter-spacing: -0.12px;
}

.global-nav .nav-inner {
    max-width: 980px;
    height: 100%;
    margin: 0 auto;
    padding: 0 var(--space-lg);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 17px;
    font-weight: 600;
    color: var(--on-dark);
    text-decoration: none;
    letter-spacing: -0.374px;
}

.nav-brand .nav-logo {
    height: 24px;
    width: 24px;
    border-radius: 5px;
    display: block;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 20px;
}

.nav-links a {
    color: var(--on-dark-muted);
    text-decoration: none;
    transition: color 0.15s;
}

.nav-links a:hover { color: var(--on-dark); }

.nav-user {
    color: var(--on-dark-muted);
    font-size: 12px;
}

/* ---- Buttons ---- */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--blue);
    color: var(--on-dark);
    font-family: "SF Pro Text", system-ui, -apple-system, sans-serif;
    font-size: 17px;
    font-weight: 400;
    letter-spacing: -0.374px;
    border: none;
    border-radius: var(--radius-pill);
    padding: 11px 22px;
    cursor: pointer;
    text-decoration: none;
    transition: transform 0.12s ease;
}

.btn-primary:hover { background: var(--blue); }
.btn-primary:active { transform: scale(0.95); }
.btn-primary:focus-visible { outline: 2px solid var(--blue-focus); outline-offset: 2px; }
.btn-primary:disabled { opacity: 0.48; cursor: not-allowed; transform: none; }

.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    color: var(--blue);
    font-family: "SF Pro Text", system-ui, -apple-system, sans-serif;
    font-size: 17px;
    font-weight: 400;
    letter-spacing: -0.374px;
    border: 1px solid var(--blue);
    border-radius: var(--radius-pill);
    padding: 11px 22px;
    cursor: pointer;
    text-decoration: none;
    transition: transform 0.12s ease;
}

.btn-secondary:active { transform: scale(0.95); }

.btn-sm { padding: 8px 15px; font-size: 14px; letter-spacing: -0.224px; }
.btn-lg { padding: 14px 28px; font-size: 18px; font-weight: 300; letter-spacing: 0; }
.btn-full { width: 100%; }

.text-link {
    color: var(--blue);
    text-decoration: none;
    font-size: 17px;
    font-weight: 400;
    letter-spacing: -0.374px;
}

.text-link:hover { text-decoration: underline; }

/* ---- Product Tiles ---- */
.tile-light {
    background: var(--canvas);
    padding: var(--space-section) var(--space-lg);
    text-align: center;
}

.tile-parchment {
    background: var(--parchment);
    padding: var(--space-section) var(--space-lg);
    text-align: center;
}

.tile-dark {
    background: var(--tile-1);
    color: var(--on-dark);
    padding: var(--space-section) var(--space-lg);
    text-align: center;
}

.tile-dark h1, .tile-dark h2, .tile-dark h3 { color: var(--on-dark); }
.tile-dark p { color: var(--on-dark-muted); }

/* ---- Utility Cards ---- */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    max-width: 980px;
    margin: 0 auto;
    padding: 0 var(--space-lg);
}

.utility-card {
    background: var(--canvas);
    border: 1px solid var(--hairline);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
}

.utility-card h3 {
    font-family: "SF Pro Display", system-ui, -apple-system, sans-serif;
    font-size: 21px;
    font-weight: 600;
    line-height: 1.19;
    letter-spacing: 0.231px;
    color: var(--ink);
    margin-bottom: var(--space-xs);
}

.utility-card p {
    font-size: 14px;
    color: var(--ink-faded);
    line-height: 1.43;
    letter-spacing: -0.224px;
}

/* ---- Form Card ---- */
.form-card {
    max-width: 460px;
    margin: 64px auto;
    background: var(--canvas);
    border: 1px solid var(--hairline);
    border-radius: var(--radius-lg);
    padding: var(--space-xxl) var(--space-xl);
}

.form-card-wide { max-width: 720px; }

.form-card h2 {
    font-family: "SF Pro Display", system-ui, -apple-system, sans-serif;
    font-size: 40px;
    font-weight: 600;
    line-height: 1.10;
    letter-spacing: 0;
    color: var(--ink);
    margin-bottom: 6px;
}

.form-card .card-sub {
    font-size: 17px;
    font-weight: 400;
    color: var(--ink-faded);
    letter-spacing: -0.374px;
    margin-bottom: var(--space-xl);
}

.form-card .card-footer {
    text-align: center;
    font-size: 14px;
    color: var(--ink-faded);
    margin-top: var(--space-lg);
}

.form-card .card-footer a { color: var(--blue); text-decoration: none; }
.form-card .card-footer a:hover { text-decoration: underline; }

/* ---- Form Fields ---- */
.field {
    margin-bottom: var(--space-md);
}

.field label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--ink-muted);
    letter-spacing: -0.224px;
    margin-bottom: 4px;
}

.field input[type="email"],
.field input[type="password"],
.field input[type="text"] {
    width: 100%;
    padding: 12px 16px;
    font-family: "SF Pro Text", system-ui, -apple-system, sans-serif;
    font-size: 17px;
    font-weight: 400;
    letter-spacing: -0.374px;
    color: var(--ink);
    background: var(--canvas);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: var(--radius-pill);
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.field input:focus {
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.12);
}

/* ---- Messages ---- */
.msg-error,
.msg-success,
.msg-info {
    font-size: 14px;
    font-weight: 400;
    letter-spacing: -0.224px;
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-sm);
    margin-bottom: var(--space-md);
}

.msg-error   { background: #ffeeed; color: #ff3b30; }
.msg-success { background: #e8f8ed; color: #34c759; }
.msg-info    { background: rgba(0, 102, 204, 0.06); color: var(--blue); }

.hidden { display: none; }

/* ---- Configurator Chips (preferences) ---- */
.section-label {
    font-family: "SF Pro Display", system-ui, -apple-system, sans-serif;
    font-size: 21px;
    font-weight: 600;
    line-height: 1.19;
    letter-spacing: 0.231px;
    color: var(--ink);
    margin: var(--space-xl) 0 var(--space-sm);
}

/* Level chips */
.level-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-sm);
    margin-bottom: var(--space-xs);
}

.level-chip {
    cursor: pointer;
}

.level-chip input { display: none; }

.level-chip-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: var(--space-md) var(--space-sm);
    background: var(--canvas);
    border: 1px solid var(--hairline);
    border-radius: var(--radius-pill);
    text-align: center;
    transition: border-color 0.15s, background 0.15s, transform 0.12s;
}

.level-chip input:checked + .level-chip-inner {
    border: 2px solid var(--blue-focus);
    background: rgba(0, 102, 204, 0.04);
}

.level-chip-inner:active { transform: scale(0.95); }

.level-chip-inner strong {
    font-size: 15px;
    font-weight: 600;
    color: var(--ink);
    letter-spacing: -0.224px;
    margin-bottom: 2px;
}

.level-chip-inner span {
    font-size: 12px;
    font-weight: 400;
    color: var(--ink-faded);
    letter-spacing: -0.12px;
    line-height: 1.3;
}

/* Domain chips */
.domain-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: var(--space-xs);
    margin-bottom: var(--space-lg);
}

.domain-chip {
    cursor: pointer;
}

.domain-chip input { display: none; }

.domain-chip-inner {
    display: flex;
    flex-direction: column;
    padding: 14px 16px;
    background: var(--canvas);
    border: 1px solid var(--hairline);
    border-radius: var(--radius-pill);
    transition: border-color 0.15s, background 0.15s, transform 0.12s;
    height: 100%;
}

.domain-chip input:checked + .domain-chip-inner {
    border: 2px solid var(--blue-focus);
    background: rgba(0, 102, 204, 0.04);
}

.domain-chip-inner:active { transform: scale(0.95); }

.domain-icon { font-size: 20px; margin-bottom: 2px; }

.domain-chip-inner strong {
    font-size: 14px;
    font-weight: 600;
    color: var(--ink);
    letter-spacing: -0.224px;
    margin-bottom: 2px;
}

.domain-chip-inner small {
    font-size: 11px;
    font-weight: 400;
    color: var(--ink-faded);
    letter-spacing: -0.08px;
    line-height: 1.3;
}

/* ---- Footer ---- */
.footer {
    background: var(--parchment);
    border-top: 1px solid var(--divider);
    text-align: center;
    padding: var(--space-lg);
    margin-top: auto;
}

.footer p {
    font-size: 12px;
    font-weight: 400;
    line-height: 1.0;
    letter-spacing: -0.12px;
    color: var(--ink-faded);
}

.footer-beian {
    margin-top: 10px;
}

.footer-beian .beian-sep {
    margin: 0 8px;
    color: var(--ink-faded);
}

.footer-beian .beian-icon {
    height: 15px;
    width: auto;
    vertical-align: -3px;
    margin-right: 4px;
}

.footer a {
    color: var(--ink-faded);
    text-decoration: none;
}

.footer a:hover {
    color: var(--blue);
    text-decoration: underline;
}

/* ---- Hero product tile ---- */
.hero-tile {
    background: var(--canvas);
    padding: var(--space-section) var(--space-lg) var(--space-xxl);
    text-align: center;
}

.hero-tile h1 {
    margin-bottom: var(--space-md);
    max-width: 680px;
    margin-left: auto;
    margin-right: auto;
}

.hero-tile .hero-sub {
    font-size: 28px;
    font-weight: 400;
    line-height: 1.14;
    letter-spacing: 0.196px;
    color: var(--ink-muted);
    max-width: 560px;
    margin: 0 auto var(--space-xl);
    font-family: "SF Pro Display", system-ui, -apple-system, sans-serif;
}

.hero-actions {
    display: flex;
    gap: var(--space-sm);
    justify-content: center;
    flex-wrap: wrap;
}

.accent { color: var(--blue); }

/* ---- Responsive ---- */
@media (max-width: 1068px) {
    .hero-display, h1 { font-size: 40px; }
    .hero-tile .hero-sub { font-size: 24px; }
    .display-lg, .form-card h2 { font-size: 34px; }
}

@media (max-width: 833px) {
    .level-grid { grid-template-columns: repeat(2, 1fr); }
    .domain-grid { grid-template-columns: 1fr 1fr; }
    .card-grid { grid-template-columns: 1fr; }
  }

@media (max-width: 640px) {
    .hero-display, h1 { font-size: 34px; }
    .hero-tile .hero-sub, .lead { font-size: 21px; }
    .form-card { margin: 32px var(--space-sm); padding: var(--space-xl) var(--space-lg); }
    .form-card h2 { font-size: 28px; }
    .tile-light, .tile-parchment, .tile-dark, .hero-tile {
        padding: var(--space-xxl) var(--space-md);
    }
    .level-grid { grid-template-columns: 1fr; }
    .domain-grid { grid-template-columns: 1fr; }
    .global-nav .nav-inner { padding: 0 var(--space-sm); }
}

@media (max-width: 419px) {
    .hero-display, h1 { font-size: 28px; }
    .hero-tile .hero-sub { font-size: 17px; }
}
