/* =========================================================
   JORDANPORTAL COMMON STYLES
   Shared charcoal, gold and warm-white design system
   ========================================================= */

:root {
    /* Brand */
    --charcoal: #17191d;
    --charcoal-soft: #202329;
    --black: #101114;
    --gold: #f5ad12;
    --gold-dark: #d98d00;
    --gold-light: #fff1c8;

    /* Neutrals */
    --white: #ffffff;
    --warm-white: #fefdf9;
    --cream: #faf8f3;
    --soft: #f3f2ee;
    --ink: #17191d;
    --ink-soft: #42464d;
    --muted: #70747c;
    --muted-light: #969aa0;
    --border: rgba(20, 24, 30, 0.12);
    --border-light: rgba(20, 24, 30, 0.07);

    /* Status */
    --success: #23845a;
    --success-light: #e7f6ee;
    --warning: #b67600;
    --warning-light: #fff1c8;
    --danger: #ad402d;
    --danger-light: #fff0ec;

    /* Compatibility with earlier styles */
    --navy: var(--charcoal);
    --navy-dark: var(--charcoal);
    --navy-deep: var(--black);
    --blue: var(--gold);
    --blue-dark: var(--gold-dark);
    --blue-light: var(--gold-light);
    --teal: var(--gold);
    --teal-dark: var(--gold-dark);
    --soft-blue: var(--cream);

    /* Layout */
    --content-width: 1400px;
    --content-narrow: 840px;

    /* Corners */
    --radius-small: 9px;
    --radius-medium: 13px;
    --radius: 18px;
    --radius-large: 28px;
    --radius-pill: 999px;

    /* Shadows */
    --shadow-xs: 0 2px 8px rgba(20, 24, 30, 0.04);
    --shadow-small: 0 12px 30px rgba(20, 24, 30, 0.07);
    --shadow: 0 20px 50px rgba(20, 24, 30, 0.11);
    --shadow-large: 0 38px 90px rgba(0, 0, 0, 0.22);
    --shadow-button: 0 16px 36px rgba(245, 173, 18, 0.24);

    /* Spacing */
    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-5: 20px;
    --space-6: 24px;
    --space-7: 32px;
    --space-8: 40px;
    --space-9: 56px;
    --space-10: 72px;
    --space-11: 96px;
    --space-12: 120px;

    /* Typography */
    --font-family:
        Inter,
        Manrope,
        "Segoe UI",
        Roboto,
        Helvetica,
        Arial,
        sans-serif;

    --font-size-base: 17px;
    --line-height-base: 1.65;

    /* Movement */
    --transition-fast: 150ms ease;
    --transition: 220ms ease;
    --transition-slow: 350ms ease;

    /* Shared gradients */
    --gradient-brand:
        linear-gradient(
            135deg,
            var(--charcoal) 0%,
            var(--charcoal-soft) 58%,
            var(--black) 100%
        );

    --gradient-button:
        linear-gradient(
            135deg,
            var(--gold) 0%,
            #ffc43d 100%
        );
}


/* ---------------------------------------------------------
   Reset
   --------------------------------------------------------- */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    text-size-adjust: 100%;
}

body {
    min-height: 100vh;
    margin: 0;
    background: var(--warm-white);
    color: var(--ink);
    font-family: var(--font-family);
    font-size: var(--font-size-base);
    line-height: var(--line-height-base);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

main {
    display: block;
}

img,
svg,
video,
canvas {
    max-width: 100%;
    height: auto;
}

img {
    display: block;
}

button,
input,
select,
textarea {
    margin: 0;
    font: inherit;
}

button {
    cursor: pointer;
}

table {
    width: 100%;
    border-collapse: collapse;
    border-spacing: 0;
}

hr {
    height: 1px;
    margin: var(--space-7) 0;
    background: var(--border);
    border: 0;
}

::selection {
    background: var(--gold-light);
    color: var(--black);
}


/* ---------------------------------------------------------
   Typography
   --------------------------------------------------------- */

h1,
h2,
h3,
h4,
h5,
h6 {
    margin: 0 0 var(--space-4);
    color: var(--charcoal);
    font-weight: 800;
    line-height: 1.12;
    letter-spacing: -0.035em;
}

h1 {
    font-size: clamp(2.8rem, 5vw, 5rem);
}

h2 {
    font-size: clamp(2.1rem, 3.8vw, 3.8rem);
}

h3 {
    font-size: clamp(1.3rem, 2vw, 1.75rem);
}

h4 {
    font-size: 1.15rem;
}

p {
    margin: 0 0 var(--space-5);
}

p:last-child {
    margin-bottom: 0;
}

strong,
b {
    font-weight: 800;
}

small {
    font-size: 0.875rem;
}

a {
    color: var(--charcoal);
    text-decoration-color: var(--gold);
    text-decoration-thickness: 2px;
    text-underline-offset: 4px;
    transition:
        color var(--transition-fast),
        opacity var(--transition-fast);
}

a:hover {
    color: var(--gold-dark);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 3px solid rgba(245, 173, 18, 0.42);
    outline-offset: 3px;
}


/* ---------------------------------------------------------
   Shared containers and sections
   --------------------------------------------------------- */

.container,
.page-width,
.jp-container {
    width: min(calc(100% - 64px), var(--content-width));
    margin-right: auto;
    margin-left: auto;
}

.jp-container-narrow {
    width: min(calc(100% - 64px), var(--content-narrow));
    margin-right: auto;
    margin-left: auto;
}

.jp-section,
.content-section {
    position: relative;
    padding: var(--space-11) 0;
}

.jp-section-compact {
    padding: var(--space-9) 0;
}

.jp-section-large {
    padding: var(--space-12) 0;
}

.jp-section-soft,
.alternate-section {
    background: var(--soft);
}

.jp-section-dark {
    background: var(--gradient-brand);
    color: rgba(255, 255, 255, 0.72);
}

.jp-section-dark h1,
.jp-section-dark h2,
.jp-section-dark h3,
.jp-section-dark h4 {
    color: var(--white);
}

.jp-section-heading {
    max-width: 850px;
    margin: 0 auto var(--space-9);
    text-align: center;
}

.jp-eyebrow,
.section-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 11px;
    margin: 0 0 var(--space-4);
    color: var(--gold-dark);
    font-size: 0.78rem;
    font-weight: 850;
    letter-spacing: 0.13em;
    text-transform: uppercase;
}

.jp-eyebrow::before,
.section-eyebrow::before {
    width: 30px;
    height: 3px;
    background: var(--gold);
    border-radius: var(--radius-pill);
    content: "";
}

.jp-lead,
.section-lead {
    max-width: 760px;
    color: var(--muted);
    font-size: clamp(1.05rem, 1.5vw, 1.22rem);
    line-height: 1.75;
}


/* ---------------------------------------------------------
   Shared grids
   --------------------------------------------------------- */

.jp-grid {
    display: grid;
    gap: var(--space-6);
}

.jp-grid-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.jp-grid-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.jp-grid-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}


/* ---------------------------------------------------------
   Buttons
   --------------------------------------------------------- */

.button,
.primary-button,
.jp-button {
    display: inline-flex;
    min-height: 52px;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 13px 24px;
    border: 1px solid transparent;
    border-radius: var(--radius-pill);
    font-weight: 800;
    line-height: 1.2;
    text-align: center;
    text-decoration: none;
    white-space: nowrap;
    transition:
        background-color var(--transition),
        border-color var(--transition),
        color var(--transition),
        box-shadow var(--transition),
        transform var(--transition);
}

.button:hover,
.primary-button:hover,
.jp-button:hover {
    transform: translateY(-2px);
}

.button-primary,
.primary-button,
.jp-button-primary {
    background: var(--charcoal);
    box-shadow: 0 14px 30px rgba(20, 24, 30, 0.18);
    color: var(--white);
}

.button-primary:hover,
.primary-button:hover,
.jp-button-primary:hover {
    background: var(--gold);
    box-shadow: var(--shadow-button);
    color: var(--black);
}

.button-secondary,
.jp-button-secondary {
    background: var(--white);
    border-color: var(--border);
    color: var(--charcoal);
}

.button-secondary:hover,
.jp-button-secondary:hover {
    background: var(--cream);
    border-color: rgba(20, 24, 30, 0.22);
    color: var(--charcoal);
}

.button-outline,
.jp-button-outline {
    background: transparent;
    border-color: var(--gold);
    color: var(--charcoal);
}

.button-outline:hover,
.jp-button-outline:hover {
    background: var(--gold);
    color: var(--black);
}

.button-dark,
.jp-button-dark {
    background: var(--charcoal);
    color: var(--white);
}

.button-dark:hover,
.jp-button-dark:hover {
    background: var(--gold);
    color: var(--black);
}

.button-small,
.jp-button-small {
    min-height: 42px;
    padding: 10px 17px;
    font-size: 0.9rem;
}

.button-large,
.jp-button-large {
    min-height: 60px;
    padding: 16px 30px;
}


/* ---------------------------------------------------------
   Cards and panels
   --------------------------------------------------------- */

.jp-card,
.jp-panel,
.service-card,
.contact-panel {
    position: relative;
    background: var(--white);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    box-shadow: var(--shadow-small);
}

.jp-card,
.service-card {
    padding: 30px;
    transition:
        border-color var(--transition),
        box-shadow var(--transition),
        transform var(--transition);
}

.jp-card:hover,
.service-card:hover {
    border-color: rgba(245, 173, 18, 0.45);
    box-shadow: var(--shadow);
    transform: translateY(-5px);
}

.jp-panel,
.contact-panel {
    padding: clamp(30px, 5vw, 56px);
}

.jp-card-icon {
    display: inline-flex;
    width: 56px;
    height: 56px;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--space-5);
    background: var(--gold-light);
    border-radius: 15px;
    color: var(--gold-dark);
    font-size: 1.4rem;
}

.jp-card p,
.service-card p {
    color: var(--muted);
}

.jp-card-accent {
    overflow: hidden;
}

.jp-card-accent::before {
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    height: 4px;
    background: var(--gold);
    content: "";
}


/* ---------------------------------------------------------
   Badges and alerts
   --------------------------------------------------------- */

.jp-badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 11px;
    border-radius: var(--radius-pill);
    background: var(--soft);
    color: var(--ink-soft);
    font-size: 0.76rem;
    font-weight: 800;
    line-height: 1;
}

.jp-badge-success {
    background: var(--success-light);
    color: var(--success);
}

.jp-badge-warning,
.jp-badge-info {
    background: var(--gold-light);
    color: var(--gold-dark);
}

.jp-badge-danger {
    background: var(--danger-light);
    color: var(--danger);
}

.jp-alert {
    padding: 15px 17px;
    border: 1px solid var(--border);
    border-radius: var(--radius-small);
    background: var(--soft);
    color: var(--ink-soft);
}

.jp-alert-success {
    background: var(--success-light);
    color: var(--success);
}

.jp-alert-warning {
    background: var(--warning-light);
    color: #855900;
}

.jp-alert-danger {
    background: var(--danger-light);
    color: var(--danger);
}


/* ---------------------------------------------------------
   Shared form basics
   --------------------------------------------------------- */

.jp-form-group {
    margin-bottom: var(--space-5);
}

.jp-label,
label {
    display: block;
    margin-bottom: 8px;
    color: var(--charcoal);
    font-size: 0.92rem;
    font-weight: 750;
}

.jp-input,
.jp-select,
.jp-textarea,
input[type="text"],
input[type="email"],
input[type="password"],
input[type="tel"],
input[type="number"],
input[type="date"],
select,
textarea {
    width: 100%;
    min-height: 50px;
    padding: 12px 14px;
    background: var(--cream);
    border: 1px solid var(--border);
    border-radius: var(--radius-small);
    color: var(--ink);
    transition:
        border-color var(--transition-fast),
        box-shadow var(--transition-fast),
        background-color var(--transition-fast);
}

.jp-input:focus,
.jp-select:focus,
.jp-textarea:focus,
input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="tel"]:focus,
input[type="number"]:focus,
input[type="date"]:focus,
select:focus,
textarea:focus {
    background: var(--white);
    border-color: var(--gold);
    box-shadow: 0 0 0 4px rgba(245, 173, 18, 0.15);
    outline: none;
}

input::placeholder,
textarea::placeholder {
    color: var(--muted-light);
}

textarea,
.jp-textarea {
    min-height: 140px;
    resize: vertical;
}


/* ---------------------------------------------------------
   Utilities
   --------------------------------------------------------- */

.jp-text-centre {
    text-align: center;
}

.jp-text-left {
    text-align: left;
}

.jp-text-right {
    text-align: right;
}

.jp-text-muted {
    color: var(--muted);
}

.jp-text-gold {
    color: var(--gold-dark);
}

.jp-text-success {
    color: var(--success);
}

.jp-hidden {
    display: none !important;
}

.jp-flex {
    display: flex;
}

.jp-inline-flex {
    display: inline-flex;
}

.jp-flex-wrap {
    flex-wrap: wrap;
}

.jp-align-start {
    align-items: flex-start;
}

.jp-align-centre {
    align-items: center;
}

.jp-align-end {
    align-items: flex-end;
}

.jp-justify-centre {
    justify-content: center;
}

.jp-justify-between {
    justify-content: space-between;
}

.jp-gap-small {
    gap: 10px;
}

.jp-gap {
    gap: 20px;
}

.jp-gap-large {
    gap: 32px;
}

.jp-full-width {
    width: 100%;
}

.jp-rounded {
    border-radius: var(--radius);
}

.jp-shadow {
    box-shadow: var(--shadow);
}

.jp-no-margin {
    margin: 0 !important;
}

.jp-no-padding {
    padding: 0 !important;
}

.jp-screen-reader-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}


/* ---------------------------------------------------------
   Responsive
   --------------------------------------------------------- */

@media (max-width: 980px) {
    .jp-grid-3,
    .jp-grid-4 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .jp-section,
    .content-section {
        padding: var(--space-10) 0;
    }
}

@media (max-width: 720px) {
    body {
        font-size: 16px;
    }

    .container,
    .page-width,
    .jp-container,
    .jp-container-narrow {
        width: min(calc(100% - 28px), var(--content-width));
    }

    .jp-section,
    .content-section,
    .jp-section-large {
        padding: var(--space-9) 0;
    }

    .jp-grid-2,
    .jp-grid-3,
    .jp-grid-4 {
        grid-template-columns: 1fr;
    }

    .jp-section-heading {
        margin-bottom: var(--space-7);
        text-align: left;
    }

    .jp-card,
    .service-card {
        padding: 24px;
    }

    .jp-panel,
    .contact-panel {
        padding: 28px 22px;
    }
}

@media (max-width: 520px) {
    .button,
    .primary-button,
    .jp-button {
        width: 100%;
        white-space: normal;
    }

    .jp-flex-mobile-column {
        flex-direction: column;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}