:root {
    --ink: #121212;
    --ink-soft: #22211f;
    --charcoal: #302f2c;
    --ivory: #fbf8f1;
    --ivory-deep: #f3ecdf;
    --paper: #fffdf8;
    --gold: #c79035;
    --gold-light: #edc778;
    --gold-dark: #8e6323;
    --line: rgba(142, 99, 35, .22);
    --muted: #6e6a63;
    --green: #208451;
    --green-soft: #e8f6ed;
    --shadow: 0 18px 50px rgba(28, 24, 17, .1);
    --serif: Georgia, 'Times New Roman', serif;
    --sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    min-width: 320px;
    color: var(--ink);
    background: var(--ivory);
    font-family: var(--sans);
    -webkit-font-smoothing: antialiased;
}

body.modal-open { overflow: hidden; }

button, input, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }

.site-header {
    min-height: 116px;
    padding: 20px clamp(24px, 5vw, 80px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
    background: linear-gradient(110deg, #0d0d0d, #181817 60%, #101010);
    border-bottom: 1px solid rgba(237, 199, 120, .2);
}

.brand { display: inline-flex; align-items: center; }
.brand img { display: block; width: min(420px, 52vw); height: auto; }

.portal-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 19px;
    color: #f7f1e5;
    border: 1px solid rgba(237, 199, 120, .7);
    border-radius: 999px;
    font-size: 14px;
    white-space: nowrap;
}

.portal-badge__icon { color: var(--gold-light); font-size: 20px; line-height: 1; }

.hero {
    min-height: 348px;
    position: relative;
    overflow: hidden;
    padding: 64px clamp(24px, 5vw, 80px);
    display: grid;
    grid-template-columns: minmax(0, .9fr) minmax(420px, 1.1fr);
    align-items: center;
    background:
        radial-gradient(circle at 22% 25%, rgba(255,255,255,.95), transparent 34%),
        linear-gradient(110deg, #fdfaf4, #f5eddf);
    border-bottom: 1px solid rgba(142, 99, 35, .12);
}

.hero__content { position: relative; z-index: 2; max-width: 640px; }
.eyebrow {
    margin: 0 0 11px;
    color: var(--gold-dark);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .19em;
    text-transform: uppercase;
}

h1, h2, h3, p { margin-top: 0; }

h1 {
    margin-bottom: 18px;
    max-width: 660px;
    font-family: var(--serif);
    font-size: clamp(38px, 4.1vw, 62px);
    line-height: 1.08;
    font-weight: 500;
    letter-spacing: -.035em;
}

.gold-rule {
    display: block;
    width: min(390px, 72%);
    height: 1px;
    margin-bottom: 18px;
    background: linear-gradient(90deg, var(--gold), rgba(199, 144, 53, .12));
}

.gold-rule::before { content: '✦'; position: relative; left: -2px; top: -10px; color: var(--gold); }

.hero__description {
    max-width: 520px;
    margin-bottom: 0;
    color: #585650;
    font-size: clamp(17px, 1.5vw, 22px);
    line-height: 1.5;
}

.hero__visual { position: absolute; inset: 0 0 0 48%; pointer-events: none; }
.hero__visual::before,
.hero__visual::after {
    content: '';
    position: absolute;
    border: 1px solid rgba(199, 144, 53, .24);
    border-radius: 50%;
}
.hero__visual::before { width: 460px; height: 460px; right: 8%; top: -145px; }
.hero__visual::after { width: 270px; height: 270px; right: 26%; bottom: -170px; }
.orbit { position: absolute; border: 1px dashed rgba(199, 144, 53, .33); border-radius: 50%; }
.orbit--one { width: 300px; height: 300px; right: 5%; top: 30px; }
.orbit--two { width: 130px; height: 130px; left: 18%; bottom: -35px; }
.spark { position: absolute; color: rgba(199, 144, 53, .55); }
.spark--one { right: 9%; top: 50px; font-size: 16px; }
.spark--two { left: 34%; top: 92px; font-size: 11px; }

.systems { padding: 54px clamp(24px, 5vw, 80px) 62px; max-width: 1680px; margin: 0 auto; }
.section-heading { display: flex; justify-content: space-between; align-items: end; gap: 32px; margin-bottom: 28px; }
.section-heading h2 { margin: 0; font-family: var(--serif); font-size: clamp(30px, 3vw, 42px); font-weight: 500; letter-spacing: -.025em; }
.section-heading > p { max-width: 520px; margin-bottom: 3px; color: var(--muted); line-height: 1.55; }

.systems-grid {
    display: grid;
    grid-template-columns: minmax(520px, 1.65fr) minmax(250px, .72fr) minmax(250px, .72fr);
    gap: 22px;
}

.system-card {
    min-width: 0;
    position: relative;
    border-radius: 20px;
    border: 1px solid var(--line);
    overflow: hidden;
}

.system-card--primary {
    min-height: 292px;
    padding: 34px;
    display: grid;
    grid-template-columns: 84px minmax(260px, 1fr) minmax(210px, .82fr);
    gap: 24px;
    align-items: center;
    color: white;
    background:
        radial-gradient(circle at 85% 15%, rgba(199, 144, 53, .13), transparent 26%),
        linear-gradient(135deg, #171717, #0f0f0f 70%);
    border-color: rgba(199, 144, 53, .8);
    box-shadow: var(--shadow);
}

.system-card__icon {
    width: 70px;
    height: 70px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    color: var(--gold-dark);
    border: 1px dashed rgba(199, 144, 53, .55);
    border-radius: 50%;
    background: rgba(255,255,255,.36);
}

.system-card__icon svg { width: 35px; height: 35px; fill: none; stroke: currentColor; stroke-width: 1.45; stroke-linecap: round; stroke-linejoin: round; }
.system-card__icon--primary { width: 82px; height: 82px; color: var(--gold-light); background: rgba(255,255,255,.025); border-style: solid; }
.system-card__icon--primary svg { width: 43px; height: 43px; }
.system-card__body { position: relative; z-index: 1; }
.system-card__title-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.system-card h3 { margin-bottom: 12px; font-family: var(--serif); font-size: clamp(27px, 2.2vw, 37px); font-weight: 500; letter-spacing: -.02em; }
.system-card--primary p { max-width: 430px; margin-bottom: 24px; color: #d8d5cf; line-height: 1.55; }

.status { display: inline-flex; align-items: center; justify-content: center; gap: 6px; width: fit-content; border-radius: 999px; white-space: nowrap; }
.status--available { padding: 7px 11px; color: #b7f1cb; background: rgba(31, 132, 80, .25); border: 1px solid rgba(91, 205, 137, .3); font-size: 12px; }
.status--request { padding: 6px 10px; color: var(--gold-dark); background: #faf4e8; border: 1px solid rgba(199, 144, 53, .35); font-size: 11px; }

.button {
    min-height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 0 20px;
    border-radius: 10px;
    border: 1px solid transparent;
    font-weight: 750;
    text-decoration: none;
    cursor: pointer;
    transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}
.button:hover { transform: translateY(-2px); }
.button:focus-visible, .modal__close:focus-visible, input:focus-visible, textarea:focus-visible { outline: 3px solid rgba(199, 144, 53, .34); outline-offset: 2px; }
.button--gold { color: #17120a; background: linear-gradient(180deg, #f4d994, #d9a64e); border-color: #b98128; box-shadow: 0 10px 22px rgba(199, 144, 53, .2); }
.button--gold:hover { box-shadow: 0 13px 26px rgba(199, 144, 53, .3); }
.button--outline { width: 100%; color: var(--gold-dark); background: transparent; border-color: rgba(142, 99, 35, .55); }
.button--outline:hover { background: #f8f0e1; }

.system-card__preview { align-self: stretch; padding: 18px; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; border: 1px solid rgba(255,255,255,.08); border-radius: 14px; background: rgba(255,255,255,.025); transform: rotate(-1deg); }
.preview-stat { padding: 10px; border: 1px solid rgba(255,255,255,.07); border-radius: 9px; }
.preview-stat span { display: block; margin-bottom: 8px; color: #8f8c87; font-size: 9px; }
.preview-stat strong { color: #e7e3da; font-size: 12px; font-weight: 650; }
.preview-chart { grid-column: 1 / -1; min-height: 105px; padding: 14px; display: flex; align-items: end; gap: 8px; border: 1px solid rgba(255,255,255,.07); border-radius: 9px; }
.preview-chart i { flex: 1; height: 35%; background: linear-gradient(#d4b06b, #655339); border-radius: 3px 3px 0 0; opacity: .72; }
.preview-chart i:nth-child(2) { height: 58%; }.preview-chart i:nth-child(3) { height: 42%; }.preview-chart i:nth-child(4) { height: 76%; }.preview-chart i:nth-child(5) { height: 61%; }.preview-chart i:nth-child(6) { height: 86%; }

.system-card--request {
    min-height: 292px;
    padding: 27px 24px 22px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    background: rgba(255, 253, 248, .64);
    box-shadow: 0 12px 35px rgba(48, 37, 20, .055);
}
.system-card--request::after { content: ''; position: absolute; inset: auto -20% -50% 16%; height: 190px; border: 1px solid rgba(199,144,53,.12); border-radius: 50%; }
.system-card--request .system-card__icon { margin-bottom: 11px; }
.system-card--request .status { margin-bottom: 12px; }
.system-card--request h3 { margin-bottom: 8px; font-size: 27px; }
.system-card--request p { min-height: 54px; margin-bottom: 17px; color: var(--muted); font-size: 13px; line-height: 1.45; }
.system-card--request .button { position: relative; z-index: 1; margin-top: auto; }

.site-footer { min-height: 82px; padding: 20px clamp(24px, 5vw, 80px); display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 28px; color: #dcb66d; background: #111; }
.site-footer p { margin: 0; font-size: 14px; text-align: center; }
.footer-line { height: 1px; background: linear-gradient(90deg, transparent, rgba(199,144,53,.7)); }
.footer-line:last-child { transform: scaleX(-1); }

.modal[hidden] { display: none; }
.modal { position: fixed; z-index: 100; inset: 0; display: grid; place-items: center; padding: 22px; }
.modal__backdrop { position: absolute; inset: 0; background: rgba(12, 12, 11, .66); backdrop-filter: blur(5px); }
.modal__dialog {
    width: min(620px, 100%);
    max-height: calc(100vh - 44px);
    overflow-y: auto;
    position: relative;
    z-index: 1;
    padding: 32px;
    background: var(--paper);
    border: 1px solid rgba(199,144,53,.72);
    border-radius: 20px;
    box-shadow: 0 30px 90px rgba(0,0,0,.3);
}
.modal__dialog h2 { margin-bottom: 7px; font-family: var(--serif); font-size: clamp(28px, 4vw, 38px); font-weight: 500; letter-spacing: -.025em; }
.modal__dialog > p:not(.eyebrow) { margin-bottom: 24px; color: var(--muted); }
.modal__close { position: absolute; right: 18px; top: 16px; width: 40px; height: 40px; border: 0; border-radius: 50%; color: var(--ink); background: transparent; font-size: 29px; line-height: 1; cursor: pointer; }
.modal__close:hover { background: var(--ivory-deep); }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { display: grid; gap: 7px; }
.field--full { grid-column: 1 / -1; }
.field span { font-size: 13px; font-weight: 750; }
.field input, .field textarea { width: 100%; border: 1px solid #d8cdbb; border-radius: 9px; color: var(--ink); background: white; }
.field input { height: 47px; padding: 0 13px; }
.field textarea { min-height: 104px; padding: 12px 13px; resize: vertical; }
.field input::placeholder, .field textarea::placeholder { color: #99938a; }
.field input[aria-invalid="true"], .field textarea[aria-invalid="true"] { border-color: #bd3b3b; }
.button--submit { width: 100%; margin-top: 18px; }
.privacy-note { margin: 11px 0 0; color: #777168; font-size: 11px; text-align: center; }
.form-error { margin: 15px 0 0; padding: 10px 12px; color: #8b1f25; background: #fff0f0; border: 1px solid #ecc4c4; border-radius: 9px; font-size: 13px; }
.success-message { display: flex; gap: 14px; padding: 17px; color: #185d38; background: var(--green-soft); border: 1px solid #acd2bb; border-radius: 12px; }
.success-message__icon { width: 30px; height: 30px; display: grid; place-items: center; flex: 0 0 auto; border: 1px solid currentColor; border-radius: 50%; }
.success-message strong { display: block; margin-bottom: 3px; }
.success-message p { margin: 0; font-size: 13px; line-height: 1.45; }
.honeypot { position: absolute !important; left: -10000px !important; width: 1px !important; height: 1px !important; overflow: hidden !important; }

@media (max-width: 1180px) {
    .systems-grid { grid-template-columns: 1fr 1fr; }
    .system-card--primary { grid-column: 1 / -1; }
}

@media (max-width: 860px) {
    .site-header { min-height: 94px; }
    .brand img { width: min(330px, 58vw); }
    .portal-badge { padding: 9px 13px; font-size: 12px; }
    .hero { min-height: 420px; grid-template-columns: 1fr; padding-top: 50px; padding-bottom: 160px; align-items: start; }
    .hero__visual { inset: 36% 0 0 40%; opacity: .64; }
    .section-heading { align-items: start; flex-direction: column; gap: 9px; }
    .system-card--primary { grid-template-columns: 74px 1fr; }
    .system-card__preview { display: none; }
}

@media (max-width: 680px) {
    .site-header { padding: 15px 20px; }
    .brand img { width: 235px; max-width: 62vw; }
    .portal-badge { width: 42px; height: 42px; padding: 0; justify-content: center; font-size: 0; }
    .portal-badge__icon { font-size: 21px; }
    .hero { min-height: 400px; padding: 48px 22px 145px; }
    h1 { font-size: clamp(35px, 11vw, 48px); }
    .hero__description { font-size: 17px; }
    .hero__visual { left: 20%; opacity: .5; }
    .systems { padding: 42px 18px 48px; }
    .systems-grid { grid-template-columns: 1fr; }
    .system-card--primary { min-height: 0; grid-column: auto; grid-template-columns: 1fr; padding: 26px 22px; gap: 17px; }
    .system-card__icon--primary { width: 66px; height: 66px; }
    .system-card--primary h3 { font-size: 32px; }
    .system-card--request { min-height: 280px; }
    .site-footer { grid-template-columns: 1fr; gap: 12px; padding: 24px 20px; }
    .footer-line { display: none; }
    .modal { padding: 10px; align-items: end; }
    .modal__dialog { max-height: 92vh; padding: 27px 19px 22px; border-radius: 20px 20px 12px 12px; }
    .modal__close { right: 10px; top: 9px; }
    .form-grid { grid-template-columns: 1fr; gap: 13px; }
    .field--full { grid-column: auto; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
