/* ==========================================================================
   OS.ST — Apple.com Light design system
   Palette: bg #ffffff · band #f5f5f7 · text #1d1d1f · muted #86868b
   Accents: blue #0071e3 · link #0066cc · orange #f56300 · green #34c759
   ========================================================================== */

:root {
    --bg: #ffffff;
    --section: #f5f5f7;
    --card: #f5f5f7;
    --text: #1d1d1f;
    --text-secondary: #86868b;
    --border: rgba(0, 0, 0, 0.08);
    --accent-blue: #0071e3;
    --accent-link: #0066cc;
    --accent-orange: #f56300;
    --accent-green: #34c759;
    --accent-purple: #af52de;
    --accent-red: #ff3b30;
    --nav-height: 44px;
    --pill-radius: 980px;
    --card-radius: 18px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

img {
    max-width: 100%;
    display: block;
}

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

a:focus-visible,
.pill-button:focus-visible {
    outline: 2px solid var(--accent-link);
    outline-offset: 2px;
    border-radius: 4px;
}

/* --------------------------------------------------------------------------
   Navbar — sticky 44px white glassmorphism
   -------------------------------------------------------------------------- */
.glass-nav {
    position: sticky;
    top: 0;
    z-index: 100;
    height: var(--nav-height);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    background: rgba(255, 255, 255, 0.8);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.nav-inner {
    max-width: 1024px;
    height: 100%;
    margin: 0 auto;
    padding: 0 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-brand {
    font-size: 17px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

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

.nav-links > a.nav-text {
    font-size: 12px;
    color: var(--text-secondary);
    transition: color 0.2s ease;
}

.nav-links > a.nav-text:hover {
    color: var(--text);
}

.lang-switcher {
    display: flex;
    align-items: center;
    gap: 2px;
    padding-left: 14px;
    border-left: 1px solid var(--border);
}

.lang-btn {
    font-size: 12px;
    color: var(--text-secondary);
    padding: 2px 6px;
    border-radius: 6px;
    transition: color 0.2s ease, background 0.2s ease;
}

.lang-btn:hover {
    color: var(--text);
    background: rgba(0, 0, 0, 0.04);
}

.lang-active {
    color: var(--text);
    font-weight: 700;
}

/* --------------------------------------------------------------------------
   Typography helpers — dark-to-grey gradient titles
   -------------------------------------------------------------------------- */
.gradient-text {
    background: linear-gradient(135deg, #1d1d1f 0%, #86868b 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

/* --------------------------------------------------------------------------
   Pill buttons — border-radius 980px
   -------------------------------------------------------------------------- */
.pill-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border-radius: var(--pill-radius);
    font-size: 17px;
    font-weight: 500;
    padding: 12px 24px;
    background: var(--accent-blue);
    color: #ffffff;
    transition: transform 0.2s ease, background 0.2s ease;
}

.pill-button:hover {
    transform: scale(1.02);
    background: #0077ed;
}

.pill-button-small {
    font-size: 13px;
    padding: 6px 14px;
}

.pill-button-secondary {
    background: #ffffff;
    color: var(--text);
    border: 1px solid rgba(0, 0, 0, 0.15);
}

.pill-button-secondary:hover {
    background: var(--section);
}

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */
.hero {
    max-width: 1024px;
    margin: 0 auto;
    padding: 110px 22px 90px;
    text-align: center;
}

.hero-eyebrow {
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--accent-link);
    margin-bottom: 20px;
}

.hero-title {
    font-size: clamp(48px, 9vw, 96px);
    font-weight: 700;
    line-height: 1.08;
    letter-spacing: -0.02em;
    margin-bottom: 24px;
}

.hero-sub {
    font-size: clamp(17px, 2.5vw, 21px);
    font-weight: 400;
    color: var(--text-secondary);
    max-width: 660px;
    margin: 0 auto 40px;
}

.hero-actions {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 14px;
}

/* --------------------------------------------------------------------------
   Sections
   -------------------------------------------------------------------------- */
.section {
    max-width: 1024px;
    margin: 0 auto;
    padding: 72px 22px;
}

.section-band {
    background: var(--section);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    padding: 72px 22px;
}

.section-inner {
    max-width: 1024px;
    margin: 0 auto;
}

.section-header {
    text-align: center;
    margin-bottom: 48px;
}

.section-title {
    font-size: clamp(32px, 5vw, 56px);
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 10px;
}

.section-sub {
    font-size: 17px;
    color: var(--text-secondary);
}

/* --------------------------------------------------------------------------
   Bento grid — white tiles on light-grey band, hover scale(1.015)
   -------------------------------------------------------------------------- */
.bento-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
}

.bento-wide {
    grid-column: span 2;
}

.bento-card {
    position: relative;
    overflow: hidden;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--card-radius);
    padding: 28px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
    min-height: 260px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    will-change: transform;
}

.bento-card:hover {
    transform: scale(1.015);
    border-color: rgba(0, 0, 0, 0.14);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.1);
}

.bento-card-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.bento-card-image + .bento-card-body {
    background: linear-gradient(to top, rgba(255, 255, 255, 0.98) 0%, rgba(255, 255, 255, 0.7) 45%, rgba(255, 255, 255, 0.1) 100%);
}

.bento-card-body {
    position: relative;
    z-index: 1;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
}

.bento-tagline {
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.4px;
    color: var(--accent-link);
}

.bento-title {
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.01em;
    background: linear-gradient(135deg, #1d1d1f 0%, #86868b 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

.bento-desc {
    font-size: 14px;
    color: var(--text-secondary);
    flex-grow: 1;
}

/* --------------------------------------------------------------------------
   Contact
   -------------------------------------------------------------------------- */
.contact-grid {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 40px;
    align-items: center;
    background: var(--section);
    border: 1px solid var(--border);
    border-radius: var(--card-radius);
    padding: 40px;
}

.contact-qr {
    text-align: center;
}

.contact-qr img {
    width: 200px;
    height: 200px;
    margin: 0 auto 12px;
    border-radius: 12px;
    background: #ffffff;
    padding: 8px;
    border: 1px solid var(--border);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.contact-qr-caption {
    font-size: 13px;
    color: var(--text-secondary);
}

.contact-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.site-footer {
    background: var(--section);
    border-top: 1px solid var(--border);
    padding: 40px 22px;
}

.footer-inner {
    max-width: 1024px;
    margin: 0 auto;
    text-align: center;
}

.footer-company {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 14px;
}

.footer-address,
.footer-contact {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 10px;
}

.footer-contact a {
    color: var(--accent-link);
}

.footer-legal {
    font-size: 12px;
    color: var(--text-secondary);
    opacity: 0.8;
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 900px) {
    .bento-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .br-desktop {
        display: none;
    }

    .contact-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .contact-actions {
        align-items: center;
    }
}

@media (max-width: 560px) {
    .bento-grid {
        grid-template-columns: 1fr;
    }

    .bento-wide {
        grid-column: span 1;
    }

    .hero {
        padding: 72px 22px 64px;
    }

    .nav-links {
        gap: 12px;
    }

    .nav-links > a.nav-text {
        display: none;
    }
}

/* --------------------------------------------------------------------------
    Admin — minimal light layout (login + panel at /admin)
    -------------------------------------------------------------------------- */
.admin-main {
    min-height: calc(100vh - var(--nav-height) - 140px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 72px 22px;
}

.admin-card {
    width: 100%;
    max-width: 440px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--card-radius);
    padding: 40px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 18px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.admin-brand-tag {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--accent-purple);
    border: 1px solid var(--border);
    border-radius: var(--pill-radius);
    padding: 2px 10px;
    margin-left: 8px;
    vertical-align: middle;
}

.admin-back {
    font-size: 12px;
    color: var(--text-secondary);
    transition: color 0.2s ease;
}

.admin-back:hover {
    color: var(--text);
}

.admin-title {
    font-size: 32px;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.admin-god {
    font-size: 14px;
    color: var(--text-secondary);
}

.admin-god strong {
    color: var(--text);
    font-weight: 600;
}

.admin-error {
    font-size: 13px;
    color: var(--accent-red);
}

.admin-telemetry {
    display: flex;
    align-items: baseline;
    gap: 12px;
}

.admin-telemetry-number {
    font-size: clamp(32px, 5vw, 44px);
    font-weight: 700;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, #1d1d1f 0%, #86868b 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

.admin-telemetry-label {
    font-size: 13px;
    color: var(--text-secondary);
}

.admin-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
    width: 100%;
}

.admin-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    width: 100%;
    font-size: 13px;
    color: var(--text-secondary);
}

.admin-field input,
.admin-field textarea {
    font-family: inherit;
    font-size: 15px;
    color: var(--text);
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.15);
    border-radius: 12px;
    padding: 10px 14px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.admin-field textarea {
    font-size: 14px;
    min-height: 72px;
    resize: vertical;
    line-height: 1.5;
}

.admin-field input:focus,
.admin-field textarea:focus {
    outline: none;
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.15);
}

.admin-submit {
    width: 100%;
    margin-top: 6px;
}

.admin-card-wide {
    max-width: 880px;
}

.admin-list-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 22px;
}

.admin-saved {
    font-size: 13px;
    color: var(--accent-green);
    margin-bottom: 14px;
}

.admin-saved-warn {
    color: var(--accent-orange);
}

.admin-actions-row {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.admin-table th {
    text-align: left;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    color: var(--text-secondary);
    padding: 8px 10px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.12);
}

.admin-table td {
    padding: 12px 10px;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}

.admin-table tbody tr:last-child td {
    border-bottom: none;
}

.admin-table-num {
    width: 48px;
    color: var(--text-secondary);
    font-variant-numeric: tabular-nums;
}

.admin-table-actions {
    text-align: right;
}

.admin-cat {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.6px;
    color: var(--text-secondary);
}

.admin-status {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    border-radius: var(--pill-radius);
    padding: 3px 12px;
}

.admin-status-active {
    color: var(--accent-green);
    background: color-mix(in srgb, var(--accent-green) 14%, #ffffff);
}

.admin-status-inactive {
    color: var(--text-secondary);
    background: rgba(0, 0, 0, 0.05);
}

.admin-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}

.admin-field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.admin-check {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--text-secondary);
}

.admin-check input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--accent-blue);
}

.admin-lang-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.admin-lang-label {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.admin-lang .admin-field {
    margin-bottom: 10px;
}

.admin-form-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 6px;
}

@media (max-width: 700px) {
    .admin-field-row,
    .admin-lang-grid {
        grid-template-columns: 1fr;
    }

    .admin-list-header {
        flex-direction: column;
        align-items: flex-start;
    }
}
