/* =========================================================
   IMS Marine — styles
   Refined, premium marine aesthetic. No external dependencies.
   ========================================================= */

/* ---------- Tokens ---------- */
:root {
    --c-bg:        #ffffff;
    --c-bg-alt:    #f5f7f9;
    --c-bg-dark:   #0d1b2a;
    --c-bg-darker: #07131f;
    --c-ink:       #15202b;
    --c-ink-soft:  #4a5a6a;
    --c-ink-mute:  #7a8a99;
    --c-line:      #e3e8ec;
    --c-line-soft: #eef1f4;
    --c-accent:    #12499d;   /* IMS brand blue — swoosh */
    --c-accent-2:  #0c59c3;   /* vivid hover blue — highlight */
    --c-accent-tint:#e7eef9;
    --c-accent-soft:#6ea8d4;
    --c-white:     #ffffff;
    --c-black:     #000000;
    --c-success:   #1a7f37;
    --c-error:     #b3261e;

    --radius-sm: 4px;
    --radius:    8px;
    --radius-lg: 14px;

    --shadow-sm: 0 1px 2px rgba(15, 30, 50, 0.05);
    --shadow:    0 4px 16px rgba(15, 30, 50, 0.08);
    --shadow-lg: 0 12px 40px rgba(15, 30, 50, 0.12);

    --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;

    --max-w: 1180px;
    --pad-x: 24px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: var(--font-sans);
    color: var(--c-ink);
    background: var(--c-bg);
    line-height: 1.55;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--c-accent); text-decoration: none; }
a:hover { color: var(--c-accent-2); }
h1, h2, h3, h4 { margin: 0 0 .4em; color: var(--c-ink); letter-spacing: -0.01em; line-height: 1.2; }
p { margin: 0 0 1em; }
button { font-family: inherit; cursor: pointer; }

/* ---------- Layout ---------- */
.container {
    width: 100%;
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0 var(--pad-x);
}

/* ---------- Header ---------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 30;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: saturate(180%) blur(10px);
    -webkit-backdrop-filter: saturate(180%) blur(10px);
    border-bottom: 1px solid var(--c-line);
}
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 68px;
}
.brand-logo { height: 36px; width: auto; }
.site-nav {
    display: flex;
    align-items: center;
    gap: 28px;
}
.site-nav a {
    color: var(--c-ink-soft);
    font-weight: 500;
    font-size: 15px;
    transition: color .15s ease;
}
.site-nav a:hover { color: var(--c-accent); }
.nav-cta {
    padding: 9px 18px;
    background: var(--c-accent);
    border-radius: var(--radius);
    color: #fff !important;
    font-weight: 600 !important;
}
.nav-cta:hover {
    background: var(--c-accent-2);
}

/* ---------- Hero ---------- */
.hero {
    position: relative;
    padding: 96px 0 88px;
    background: linear-gradient(180deg, var(--c-bg) 0%, var(--c-bg-alt) 100%);
    overflow: hidden;
}
.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 20% 30%, rgba(18, 73, 157, 0.07), transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(12, 89, 195, 0.05), transparent 50%);
    pointer-events: none;
}
.hero-inner {
    position: relative;
    text-align: center;
    max-width: 820px;
}
.hero-logo {
    height: 84px;
    width: auto;
    margin: 0 auto 28px;
}
.hero-title {
    font-size: clamp(32px, 5vw, 52px);
    font-weight: 700;
    color: var(--c-ink);
    margin-bottom: 18px;
    letter-spacing: -0.02em;
}
.hero-sub {
    font-size: clamp(16px, 2vw, 19px);
    color: var(--c-ink-soft);
    max-width: 640px;
    margin: 0 auto 36px;
    line-height: 1.6;
}
.hero-cta {
    display: inline-flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
}

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 28px;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 15px;
    letter-spacing: 0.01em;
    text-decoration: none;
    border: 1px solid transparent;
    transition: transform .12s ease, background .15s ease, color .15s ease, box-shadow .15s ease, border-color .15s ease;
    cursor: pointer;
    line-height: 1.2;
}
.btn-primary {
    background: var(--c-accent);
    color: #fff;
    box-shadow: var(--shadow-sm);
}
.btn-primary:hover {
    background: var(--c-accent-2);
    color: #fff;
    box-shadow: var(--shadow);
}
.btn-secondary {
    background: #fff;
    color: var(--c-ink);
    border-color: var(--c-line);
}
.btn-secondary:hover {
    border-color: var(--c-accent);
    color: var(--c-accent);
}
.btn-ghost {
    background: transparent;
    color: #fff;
    border-color: rgba(255, 255, 255, 0.3);
}
.btn-ghost:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.6);
}
.btn-block { width: 100%; padding: 16px 28px; }
.btn-lg { padding: 16px 32px; font-size: 16px; }

/* ---------- Section heads ---------- */
.section-head {
    text-align: center;
    max-width: 720px;
    margin: 0 auto 56px;
}
.eyebrow {
    display: inline-block;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--c-accent);
    margin-bottom: 14px;
}
.eyebrow-dark { color: var(--c-accent-soft); }
.section-head h2 {
    font-size: clamp(26px, 3.4vw, 36px);
    color: var(--c-ink);
    font-weight: 700;
}
.section-sub {
    font-size: 16px;
    color: var(--c-ink-soft);
    margin: 12px auto 0;
    max-width: 600px;
}

/* ---------- Stats band ---------- */
.stats {
    background: var(--c-bg);
    border-bottom: 1px solid var(--c-line-soft);
    padding: 36px 0;
}
.stat-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    text-align: center;
}
.stat-num {
    font-size: clamp(22px, 2.6vw, 30px);
    font-weight: 700;
    color: var(--c-accent);
    letter-spacing: -0.01em;
    line-height: 1;
    margin-bottom: 8px;
}
.stat-label {
    font-size: 13px;
    color: var(--c-ink-soft);
    font-weight: 500;
    letter-spacing: 0.02em;
}

/* ---------- Brands ---------- */
.brands {
    padding: 96px 0;
    background: var(--c-bg);
}
.brand-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
}
.brand-card {
    background: var(--c-bg-alt);
    border: 1px solid var(--c-line-soft);
    border-radius: var(--radius);
    padding: 28px 24px;
    text-align: center;
    transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 160px;
}
.brand-card:hover {
    border-color: var(--c-accent);
    box-shadow: var(--shadow-sm);
    transform: translateY(-2px);
}
.brand-logo-wrap {
    width: 100%;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
}
.brand-logo-wrap.no-logo {
    height: 0;
    margin-bottom: 0;
}
.brand-logo-img {
    max-height: 60px;
    max-width: 80%;
    width: auto;
    object-fit: contain;
}
.brand-name {
    font-size: 19px;
    font-weight: 700;
    color: var(--c-ink);
    letter-spacing: -0.01em;
    margin-bottom: 4px;
}
.brand-tag {
    font-size: 13px;
    color: var(--c-ink-mute);
    letter-spacing: 0.02em;
}

/* ---------- Services ---------- */
.services {
    padding: 96px 0;
    background: var(--c-bg-alt);
    border-top: 1px solid var(--c-line-soft);
    border-bottom: 1px solid var(--c-line-soft);
}
.service-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}
.service-card {
    background: #fff;
    border: 1px solid var(--c-line);
    border-radius: var(--radius-lg);
    padding: 36px 32px;
    transition: transform .15s ease, box-shadow .15s ease;
}
.service-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}
.service-icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    background: var(--c-accent-tint);
    color: var(--c-accent);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}
.service-icon svg { width: 24px; height: 24px; }
.service-card h3 {
    font-size: 20px;
    margin-bottom: 10px;
}
.service-card p {
    color: var(--c-ink-soft);
    font-size: 15px;
    margin: 0;
    line-height: 1.6;
}

/* ---------- Why IMS ---------- */
.why {
    padding: 96px 0;
    background: var(--c-bg);
}
.why-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 32px;
}
.why-item {
    padding: 24px 0;
    border-top: 2px solid var(--c-accent);
}
.why-num {
    font-size: 13px;
    font-weight: 700;
    color: var(--c-accent);
    letter-spacing: 0.08em;
    margin-bottom: 16px;
}
.why-item h3 {
    font-size: 19px;
    margin-bottom: 10px;
    color: var(--c-ink);
}
.why-item p {
    font-size: 15px;
    color: var(--c-ink-soft);
    margin: 0;
    line-height: 1.6;
}

/* ---------- CTA band ---------- */
.cta-band {
    background: var(--c-bg-dark);
    color: #fff;
    padding: 72px 0;
    background-image:
        radial-gradient(circle at 80% 30%, rgba(18, 73, 157, 0.35), transparent 50%),
        radial-gradient(circle at 20% 80%, rgba(12, 89, 195, 0.22), transparent 50%);
}
.cta-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 32px;
}
.cta-text { max-width: 560px; }
.cta-text h2 {
    color: #fff;
    font-size: clamp(24px, 2.8vw, 32px);
    margin-bottom: 8px;
}
.cta-text p {
    color: #c7d0d9;
    margin: 0;
    font-size: 16px;
}
.cta-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

/* ---------- Footer ---------- */
.site-footer {
    background: var(--c-bg-darker);
    color: #97a3af;
    padding: 64px 0 24px;
    font-size: 14px;
}
.footer-inner {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
    gap: 40px;
    margin-bottom: 40px;
}
.footer-col h4 {
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 12px;
}
.footer-col p { margin: 0 0 6px; line-height: 1.55; }
.footer-col a { color: #c7d0d9; }
.footer-col a:hover { color: #fff; }
.footer-wordmark {
    display: flex;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 14px;
    flex-wrap: wrap;
}
.footer-wordmark-main {
    font-size: 28px;
    font-weight: 800;
    color: #fff;
    letter-spacing: 0.04em;
    line-height: 1;
}
.footer-wordmark-sub {
    font-size: 12px;
    font-weight: 600;
    color: var(--c-accent-soft);
    letter-spacing: 0.16em;
    text-transform: uppercase;
}
.footer-tag {
    color: #97a3af;
    font-size: 13px;
    max-width: 280px;
}
.muted { color: #6c7783; font-size: 13px; }
.footer-bottom {
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 12px;
    color: #6c7783;
    text-align: center;
}
.footer-bottom p { margin: 0; }

/* =========================================================
   REGISTER PAGE  (register.html)
   ========================================================= */
.page-register {
    background: var(--c-bg-darker);
    min-height: 100vh;
}
.register-shell {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
    min-height: 100vh;
}
/* Dark left panel */
.register-aside {
    background: var(--c-bg-dark);
    color: #d6dde4;
    padding: 56px 56px;
    position: relative;
    overflow: hidden;
}
.register-aside::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 20% 20%, rgba(18, 73, 157, 0.35), transparent 55%),
        radial-gradient(circle at 80% 90%, rgba(12, 89, 195, 0.18), transparent 50%);
    pointer-events: none;
}
.register-aside-inner {
    position: relative;
    max-width: 480px;
    margin-left: auto;
    display: flex;
    flex-direction: column;
    height: 100%;
}
.register-back {
    display: inline-flex;
    align-items: center;
    color: #a8b4c0 !important;
    font-size: 14px;
    margin-bottom: 36px;
    text-decoration: none;
    transition: color .15s ease;
    align-self: flex-start;
}
.register-back:hover { color: #fff !important; }

.register-brand {
    display: inline-block;
    margin-bottom: 40px;
}
.register-logo {
    height: 56px;
    width: auto;
    background: #fff;
    padding: 8px 14px;
    border-radius: var(--radius);
}
.register-heading {
    color: #fff;
    font-size: clamp(26px, 3vw, 36px);
    font-weight: 700;
    margin-bottom: 16px;
    letter-spacing: -0.02em;
    line-height: 1.15;
}
.register-lede {
    color: #a8b4c0;
    font-size: 16px;
    line-height: 1.65;
    margin-bottom: 32px;
}
.register-points {
    list-style: none;
    padding: 0;
    margin: 0 0 auto;
}
.register-points li {
    padding: 12px 0 12px 28px;
    position: relative;
    color: #c7d0d9;
    font-size: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}
.register-points li:first-child { border-top: 0; }
.register-points li::before {
    content: "";
    position: absolute;
    left: 2px;
    top: 50%;
    transform: translateY(-65%) rotate(45deg);
    width: 6px;
    height: 11px;
    border-right: 2px solid var(--c-accent-soft);
    border-bottom: 2px solid var(--c-accent-soft);
}
.register-contact {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 40px;
    padding-top: 28px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.register-contact-block {
    display: flex;
    flex-direction: column;
}
.register-contact-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--c-accent-soft);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 4px;
}
.register-contact-block a {
    color: #fff !important;
    font-size: 14px;
    word-break: break-all;
}
.register-contact-block a:hover {
    color: var(--c-accent-soft) !important;
}

/* Right white panel */
.register-main {
    background: var(--c-bg);
    padding: 56px 56px;
    display: flex;
    align-items: center;
}
.register-main-inner {
    width: 100%;
    max-width: 560px;
}
.register-form-head {
    margin-bottom: 28px;
}
.register-form-head h2 {
    font-size: 28px;
    margin-bottom: 8px;
}
.register-form-head p {
    color: var(--c-ink-mute);
    font-size: 14px;
    margin: 0;
}
.req { color: var(--c-accent); margin-left: 2px; }

/* =========================================================
   FORM (shared)
   ========================================================= */
.form-row { margin-bottom: 16px; }
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}
.form label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--c-ink);
    margin-bottom: 6px;
    letter-spacing: 0.01em;
}
.form input,
.form select,
.form textarea {
    width: 100%;
    padding: 12px 14px;
    font-family: inherit;
    font-size: 15px;
    color: var(--c-ink);
    background: #fff;
    border: 1px solid var(--c-line);
    border-radius: var(--radius);
    transition: border-color .15s ease, box-shadow .15s ease;
    -webkit-appearance: none;
    appearance: none;
}
.form select {
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3e%3cpath fill='%237a8a99' d='M6 8L0 0h12z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 36px;
}
.form textarea { resize: vertical; min-height: 110px; }
.form input:focus,
.form select:focus,
.form textarea:focus {
    outline: none;
    border-color: var(--c-accent);
    box-shadow: 0 0 0 3px rgba(18, 73, 157, 0.15);
}
.field-error {
    border-color: var(--c-error) !important;
    background: #fdf3f2;
}
.form-note {
    font-size: 12px;
    color: var(--c-ink-mute);
    text-align: center;
    margin: 14px 0 0;
    line-height: 1.5;
}
.hp-field {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* =========================================================
   THANKS PAGE  (thanks.html)
   ========================================================= */
.page-thanks {
    background: var(--c-bg-dark);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-image:
        radial-gradient(circle at 30% 20%, rgba(18, 73, 157, 0.35), transparent 55%),
        radial-gradient(circle at 70% 90%, rgba(12, 89, 195, 0.22), transparent 50%);
}
.thanks-shell {
    width: 100%;
    padding: 48px 24px;
}
.thanks-card {
    background: #fff;
    max-width: 560px;
    margin: 0 auto;
    border-radius: var(--radius-lg);
    padding: 56px 48px;
    text-align: center;
    box-shadow: var(--shadow-lg);
}
.thanks-brand {
    display: inline-block;
    margin-bottom: 28px;
}
.thanks-logo {
    height: 48px;
    width: auto;
    margin: 0 auto;
}
.thanks-check {
    width: 64px;
    height: 64px;
    margin: 0 auto 24px;
    background: var(--c-accent);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 20px rgba(18, 73, 157, 0.35);
}
.thanks-check svg { width: 32px; height: 32px; }
.thanks-title {
    font-size: clamp(22px, 3vw, 30px);
    margin-bottom: 12px;
    color: var(--c-ink);
}
.thanks-sub {
    color: var(--c-ink-soft);
    font-size: 15px;
    line-height: 1.6;
    margin-bottom: 32px;
}
.thanks-meta {
    background: var(--c-bg-alt);
    border-radius: var(--radius);
    padding: 18px 24px;
    margin-bottom: 32px;
    text-align: left;
}
.thanks-meta-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid var(--c-line-soft);
    font-size: 14px;
}
.thanks-meta-row:last-child { border-bottom: 0; }
.thanks-meta-label {
    color: var(--c-ink-mute);
    font-weight: 500;
}
.thanks-meta-value {
    color: var(--c-ink);
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}
.thanks-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 28px;
}
.thanks-foot {
    font-size: 13px;
    color: var(--c-ink-mute);
    line-height: 1.6;
    margin: 0;
}
.thanks-foot a { color: var(--c-accent); }

/* =========================================================
   TOAST
   ========================================================= */
.toast {
    position: fixed;
    left: 50%;
    bottom: 28px;
    transform: translateX(-50%) translateY(20px);
    background: var(--c-ink);
    color: #fff;
    padding: 14px 20px;
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 500;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    pointer-events: none;
    transition: opacity .25s ease, transform .25s ease;
    z-index: 100;
    max-width: calc(100% - 32px);
    text-align: center;
}
.toast-visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
    pointer-events: auto;
}
.toast-success { background: var(--c-success); }
.toast-error   { background: var(--c-error); }

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 960px) {
    .register-shell { grid-template-columns: 1fr; }
    .register-aside { padding: 48px 32px; }
    .register-aside-inner { max-width: 100%; margin: 0; }
    .register-main { padding: 48px 32px; }
    .register-main-inner { max-width: 100%; }
    .stat-grid { grid-template-columns: repeat(2, 1fr); }
    .footer-inner { grid-template-columns: 1fr 1fr; gap: 32px; }
    .cta-inner { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 640px) {
    .site-nav { gap: 14px; }
    .site-nav a:not(.nav-cta) { display: none; }
    .nav-cta { padding: 8px 14px; font-size: 14px; }
    .hero { padding: 64px 0 56px; }
    .hero-logo { height: 64px; margin-bottom: 20px; }
    .brands, .services, .why { padding: 64px 0; }
    .cta-band { padding: 56px 0; }
    .form-grid { grid-template-columns: 1fr; gap: 0; }
    .footer-inner { grid-template-columns: 1fr; gap: 28px; }
    .section-head { margin-bottom: 36px; }
    .stat-grid { grid-template-columns: 1fr 1fr; gap: 16px; }
    .register-aside, .register-main { padding: 40px 24px; }
    .register-contact { grid-template-columns: 1fr; gap: 16px; }
    .thanks-card { padding: 40px 28px; }
}
