/**
 * Paradise Healthcare - design system
 * "Clinical & Precise": white ground, hairline rules, letterspaced labels,
 * wine used as a sharp accent rather than a wash.
 *
 * Loaded after Tailwind so these classes can rely on the token colours.
 */

:root {
    --wine: #770034;
    --wine-deep: #540024;
    --magenta: #d80061;
    --ink-900: #130a0f;
    --ink-700: #332830;
    --ink-600: #453842;
    --ink-400: #7e6d77;
    --hairline: #cfc2c9;
    --hairline-soft: #e7dfe2;
}

html { scroll-behavior: smooth; }

body {
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 16px;
    color: var(--ink-900);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

/* ------------------------------------------------------------------ labels */

/* Small-caps section label with a leading rule. The rule is the single most
   recognisable element of this design system - it marks every section. */
.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: .7rem;
    font-size: .75rem;
    font-weight: 800;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--wine);
}
.eyebrow::before {
    content: '';
    width: 2rem;
    height: 2px;
    background: var(--magenta);
    flex: none;
}
.eyebrow--center::before { display: none; }

/* ------------------------------------------------------------- typography */

.display {
    font-family: 'Plus Jakarta Sans', Inter, sans-serif;
    font-weight: 800;
    letter-spacing: -0.025em;
    line-height: 1.08;
    color: var(--ink-900);
}

.lead {
    font-size: 1.125rem;
    line-height: 1.65;
    color: var(--ink-600);
}
@media (min-width: 768px) { .lead { font-size: 1.25rem; } }

/* Monospaced data - CAS numbers, catalogue numbers, formulae. Part of the
   "clinical" read: technical values look like values, not prose. */
.datum {
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.01em;
}

/* ---------------------------------------------------------------- surfaces */

.hairline { border: 1px solid var(--hairline); }

/* Cards are defined by a hairline and a hover lift, never by a heavy shadow -
   shadows make a clinical layout look consumer. */
.card {
    background: #fff;
    border: 1px solid var(--hairline);
    transition: border-color .2s ease, transform .2s ease, box-shadow .2s ease;
}
.card:hover {
    border-color: rgba(119, 0, 52, .3);
    transform: translateY(-2px);
    box-shadow: 0 12px 28px -18px rgba(22, 13, 18, .35);
}

/* Faint engineering grid, used behind dark sections. */
.grid-bg {
    background-image:
        linear-gradient(to right, rgba(255, 255, 255, .06) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(255, 255, 255, .06) 1px, transparent 1px);
    background-size: 56px 56px;
}

.grid-bg--light {
    background-image:
        linear-gradient(to right, rgba(22, 13, 18, .04) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(22, 13, 18, .04) 1px, transparent 1px);
    background-size: 56px 56px;
}

/* ------------------------------------------------------------ rich text */

/* Applied to HTML coming out of the admin editor, which arrives as bare
   <p>/<h2>/<ul> with no classes. */
.prose-phc { color: var(--ink-600); font-size: 1.0625rem; line-height: 1.75; }
.prose-phc > * + * { margin-top: 1.15em; }
.prose-phc h1,
.prose-phc h2,
.prose-phc h3,
.prose-phc h4 {
    font-family: 'Plus Jakarta Sans', Inter, sans-serif;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--ink-900);
    margin-top: 2em;
    margin-bottom: .6em;
    line-height: 1.25;
}
.prose-phc h1 { font-size: 1.875rem; }
.prose-phc h2 { font-size: 1.5rem; }
.prose-phc h3 { font-size: 1.1875rem; }
.prose-phc h4 { font-size: 1.0625rem; }
.prose-phc p { margin-bottom: 1.15em; }
.prose-phc strong { color: var(--ink-900); font-weight: 700; }
.prose-phc a { color: var(--wine); text-decoration: underline; text-underline-offset: 3px; }
.prose-phc a:hover { color: var(--magenta); }
.prose-phc ul,
.prose-phc ol { padding-left: 1.3em; margin-bottom: 1.15em; }
.prose-phc ul { list-style: none; padding-left: 0; }
.prose-phc ul > li {
    position: relative;
    padding-left: 1.4em;
    margin-bottom: .55em;
}
.prose-phc ul > li::before {
    content: '';
    position: absolute;
    left: 0;
    top: .62em;
    width: .4em;
    height: .4em;
    background: var(--magenta);
    border-radius: 999px;
}
.prose-phc ol { list-style: decimal; }
.prose-phc ol > li { margin-bottom: .55em; padding-left: .25em; }
.prose-phc blockquote {
    border-left: 2px solid var(--magenta);
    padding-left: 1.15em;
    font-style: italic;
    color: var(--ink-900);
}
/* Rich-text tables.
   These are mostly label/value specification tables, so the first column is
   treated as the label rail rather than drawing a full grid of boxes - a ruled
   grid makes a two-column table look like a spreadsheet screenshot. */
.prose-phc .table-scroll {
    margin: 2em 0;
    overflow-x: auto;
    border: 1px solid var(--hairline);
    border-top: 2px solid var(--wine);
    background: #fff;
    -webkit-overflow-scrolling: touch;
}

/* Prose is capped at a comfortable reading measure, but a table is scanned
   rather than read - let it break out of that measure on wider screens. */
@media (min-width: 1024px) {
    .prose-phc .table-scroll {
        width: 60rem;
        max-width: calc(100vw - 4rem);
    }
}

.prose-phc table {
    width: 100%;
    min-width: 30rem;
    margin: 0;
    border-collapse: collapse;
    font-size: .9375rem;
    line-height: 1.55;
}

.prose-phc thead th {
    padding: .85rem 1.15rem;
    text-align: left;
    font-size: .6875rem;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--wine);
    background: #faf6f7;
    border-bottom: 1px solid var(--hairline);
    white-space: nowrap;
}

.prose-phc tbody td {
    padding: .85rem 1.15rem;
    text-align: left;
    vertical-align: top;
    border-bottom: 1px solid var(--hairline-soft);
    color: var(--ink-600);
}

.prose-phc tbody tr:last-child td { border-bottom: 0; }
.prose-phc tbody tr:hover td { background: #fdf7f9; }

/* Label rail: first column carries the row's name. */
.prose-phc tbody td:first-child {
    width: 38%;
    font-weight: 650;
    color: var(--ink-900);
    background: #faf8f9;
    border-right: 1px solid var(--hairline-soft);
}

/* A single-column table has no label rail to draw. */
.prose-phc tbody tr > td:only-child {
    width: auto;
    background: transparent;
    border-right: 0;
}

/* Numbers and quantities line up when they are tabular. */
.prose-phc tbody td { font-variant-numeric: tabular-nums; }

/* Heading that introduces a table sits tight to it. */
.prose-phc h3 + .table-scroll,
.prose-phc h4 + .table-scroll { margin-top: .9em; }

.prose-phc table p { margin: 0; }
.prose-phc table span { color: inherit; background: none; }
.prose-phc img { border-radius: .5rem; }

/* Intro standfirst - the opening paragraph of a content page, set larger and
   darker so it carries the space above the first real section. */
.prose-phc--intro {
    font-size: 1.1875rem;
    line-height: 1.65;
    color: var(--ink-700);
    max-width: 58ch;
}
@media (min-width: 768px) { .prose-phc--intro { font-size: 1.3125rem; } }
.prose-phc--intro p { margin-bottom: .85em; }

/* Legacy alias - the admin editor output is tagged .html-content in older views. */
.html-content { color: var(--ink-600); line-height: 1.75; }
.html-content p { margin-bottom: 1.15em; }
.html-content h1,
.html-content h2 {
    font-family: 'Plus Jakarta Sans', Inter, sans-serif;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--ink-900);
    margin: 2em 0 .6em;
}
.html-content ol > li[data-list='bullet'] {
    list-style: none;
    position: relative;
    padding-left: 1.5rem;
}
.html-content ol > li[data-list='bullet']::before {
    content: '•';
    position: absolute;
    left: 0;
    top: 0;
    font-weight: 700;
    color: var(--magenta);
}
.html-content .ql-ui { display: none !important; }

/* ------------------------------------------------------------ navigation */

/* Underline that grows from the left on hover - used on the main nav. */
.nav-link { position: relative; }
.nav-link::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -2px;
    height: 2px;
    width: 0;
    background: var(--magenta);
    transition: width .22s cubic-bezier(.16, 1, .3, 1);
}
.nav-link:hover::after,
.nav-link[aria-current='page']::after { width: 100%; }

/* Mega panel open/close. Driven by JS toggling [data-open] rather than
   group-hover, so keyboard and touch both work. */
.mega {
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: opacity .18s ease, transform .18s ease, visibility .18s;
}
.mega[data-open='true'] { opacity: 1; visibility: visible; transform: translateY(0); }

/* --------------------------------------------------------------- utility */

.paradise-font { font-family: 'Righteous', sans-serif; text-transform: uppercase; }

/* Respect users who have asked for less motion. */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }
}

/* ------------------------------------------------------------------------
   Homepage hero slider (components/home-hero.blade.php)
   Slow zoom on the active slide's photo, and its text rising in.
   ------------------------------------------------------------------------ */
.hero-slide__img {
    transform: scale(1);
    transition: transform 9s ease-out;
}
.hero-slide.is-active .hero-slide__img { transform: scale(1.07); }

.hero-slide__body > * {
    opacity: 0;
    transform: translateY(14px);
    transition: opacity .7s ease-out, transform .7s ease-out;
}
.hero-slide.is-active .hero-slide__body > * { opacity: 1; transform: none; }
.hero-slide.is-active .hero-slide__body > :nth-child(2) { transition-delay: .12s; }
.hero-slide.is-active .hero-slide__body > :nth-child(3) { transition-delay: .24s; }
.hero-slide.is-active .hero-slide__body > :nth-child(4) { transition-delay: .36s; }

/* Before the script runs (or without it) the first slide must still be readable. */
.hero-slider:not(.is-ready) .hero-slide:first-child .hero-slide__body > * { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
    .hero-slide,
    .hero-slide__img,
    .hero-slide__body > * { transition: none !important; }
    .hero-slide.is-active .hero-slide__img { transform: none; }
}
