/* ============================================
   Custodia UK — Website 2
   Minimalist, typography-driven design
   ============================================ */

/* --- Custom Properties --- */
:root {
    --bg: #fafafa;
    --sidebar-bg: #ffffff;
    --sidebar-border: #eee;
    --text: #333333;
    --heading: #1a1a1a;
    --accent: #fbd068;
    --link: #292828;
    --link-hover: #fbd068;
    --dark: #292828;
    --sidebar-width: 260px;
    --content-max: 1100px;
    --content-pad: 80px;
    --transition: 200ms ease;
    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* --- Reset & Base --- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 17px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font);
    font-weight: 400;
    line-height: 1.7;
    color: var(--text);
    background: var(--bg);
}

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

a {
    color: var(--link);
    text-decoration: none;
    transition: color var(--transition);
}

a:hover {
    color: var(--link-hover);
}

ul, ol {
    padding-left: 1.5em;
}

/* --- Typography --- */
h1, h2, h3, h4 {
    font-family: Georgia, 'Times New Roman', serif;
    color: var(--heading);
    line-height: 1.25;
}

h1 {
    font-size: 3rem;
    font-weight: 400;
    margin-top: 0;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}

h2 {
    font-size: 1.8rem;
    font-weight: 400;
    margin-top: 2.5rem;
    margin-bottom: 0.75rem;
}

h3 {
    font-size: 1.3rem;
    font-weight: 600;
    margin-top: 2rem;
    margin-bottom: 0.5rem;
}

h4 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
}

p {
    font-size: 1.05rem;
    line-height: 1.9;
    margin-bottom: 1rem;
}

article h2:first-of-type {
    margin-top: 2rem;
}

article h2 + p {
    text-indent: 2em;
}

article h2 ~ p + p {
    text-indent: 2em;
}

/* --- Layout: Sidebar + Content --- */
.site-wrapper {
    display: flex;
    min-height: 100vh;
}

/* --- Sidebar --- */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: var(--sidebar-width);
    background: var(--sidebar-bg);
    border-right: 1px solid var(--sidebar-border);
    display: flex;
    flex-direction: column;
    z-index: 100;
    overflow-y: auto;
    padding: 2rem 1.5rem;
}

.sidebar-logo {
    display: block;
    margin-bottom: 2.5rem;
}

.sidebar-logo img {
    width: 160px;
}

/* Nav sections */
.nav-label {
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 0.82rem;
    font-weight: 400;
    font-style: italic;
    text-transform: none;
    letter-spacing: 0;
    color: #999;
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
    padding-left: 0.75rem;
}

.nav-label:first-of-type {
    margin-top: 0;
}

.sidebar-nav {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-nav li {
    margin: 0;
}

.sidebar-nav a {
    display: block;
    padding: 0.35rem 0.75rem;
    font-size: 0.88rem;
    font-weight: 400;
    text-transform: none;
    letter-spacing: 0.02em;
    color: var(--link);
    border-left: 3px solid transparent;
    transition: all var(--transition);
}

.sidebar-nav a:hover {
    color: var(--link-hover);
    border-left-color: var(--accent);
}

.sidebar-nav a.active {
    font-weight: 600;
    color: var(--heading);
    border-left-color: var(--accent);
}

.sidebar-nav .sub-item a {
    padding-left: 1.5rem;
    font-size: 0.76rem;
    text-transform: none;
    letter-spacing: 0.02em;
    font-weight: 400;
}

.sidebar-nav .sub-item a.active {
    font-weight: 600;
}

/* Sidebar contact info at bottom */
.sidebar-contact {
    margin-top: auto;
    padding-top: 2rem;
    border-top: 1px solid var(--sidebar-border);
}

.sidebar-contact a {
    display: block;
    font-size: 0.82rem;
    font-weight: 500;
    text-transform: none;
    letter-spacing: 0;
    padding: 0.2rem 0;
    color: var(--text);
    border-left: none;
}

.sidebar-contact a:hover {
    color: var(--link-hover);
}

.sidebar-contact .phone {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

/* --- Main Content --- */
.content {
    margin-left: var(--sidebar-width);
    flex: 1;
    min-height: 100vh;
}

.content article {
    padding: var(--content-pad);
    padding-bottom: 3rem;
    width: 100%;
}

/* Readable line length for prose */
.content article p,
.content article li {
    max-width: 62ch;
}

/* Hero/banner images */
.page-hero {
    width: 100%;
    max-width: none;
    height: 280px;
    object-fit: cover;
    object-position: center;
    border-radius: 6px;
    margin-bottom: 2.5rem;
    overflow: hidden;
}

/* --- Hero Split (text left, image right) --- */
.hero-split {
    display: flex;
    align-items: center;
    gap: 3rem;
    margin-bottom: 2.5rem;
}

.hero-split-text {
    flex: 1;
    min-width: 0;
}

.hero-split-text h1 {
    margin-bottom: 0.75rem;
}

.hero-split-text .strapline {
    margin-bottom: 0;
}

.hero-split-img {
    width: 320px;
    flex-shrink: 0;
    border-radius: 6px;
    object-fit: cover;
}

@media (max-width: 768px) {
    .hero-split {
        flex-direction: column-reverse;
        gap: 1.5rem;
    }

    .hero-split-img {
        width: 100%;
        max-height: 300px;
    }
}

.page-hero-wide {
    margin-left: calc(-1 * var(--content-pad));
    margin-right: calc(-1 * var(--content-pad));
    width: calc(100% + 2 * var(--content-pad));
    max-width: none;
    height: 320px;
    object-fit: cover;
    border-radius: 0;
    margin-bottom: 2.5rem;
}

.content article ul,
.content article ol {
    margin-bottom: 1rem;
}

.content article li {
    margin-bottom: 0.35rem;
}

/* --- Strapline / Subtitle --- */
.strapline {
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 1.3rem;
    font-weight: 400;
    font-style: italic;
    color: #888;
    margin-bottom: 2rem;
    line-height: 1.5;
}

.page-intro {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 1rem;
}

/* --- Pull Quote --- */
.pull-quote {
    border-left: 4px solid var(--accent);
    padding: 1rem 0 1rem 1.5rem;
    margin: 2rem 0;
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 1.2rem;
    font-weight: 400;
    font-style: italic;
    line-height: 1.6;
    color: var(--heading);
}

/* --- Landing / Hero --- */
.landing {
    display: flex;
    align-items: center;
    padding: var(--content-pad);
    padding-bottom: 2rem;
}

.landing-inner {
    max-width: 650px;
}

.landing-hello {
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 1.4rem;
    font-style: italic;
    color: #999;
    margin-bottom: 1rem;
    min-height: 1.4em;
}

.landing-heading {
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 3.2rem;
    font-weight: 400;
    line-height: 1.2;
    color: var(--heading);
    margin-bottom: 1rem;
    opacity: 0;
    transition: opacity 1.8s ease;
}

.landing-heading.visible {
    opacity: 1;
}

.typed-list {
    margin-bottom: 0.25rem;
}

.typed-line {
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 1.8rem;
    font-weight: 400;
    line-height: 1.4;
    color: var(--heading);
    height: 2.6rem;
}

.typed-line .typed-text:not(:empty) {
    border-bottom: 3px solid var(--accent);
    padding-bottom: 2px;
    transition: border-color 2s ease;
}

.typed-line.done .typed-text {
    border-color: transparent;
}

.cursor {
    font-weight: 300;
    color: var(--accent);
    animation: blink 0.7s step-end infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.landing-sub {
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 1.2rem;
    font-style: italic;
    color: #888;
    margin-top: 1.5rem;
    margin-bottom: 2.5rem;
    opacity: 0;
    transition: opacity 0.6s ease;
}

.landing-sub.visible {
    opacity: 1;
}

.landing-buttons {
    display: flex;
    gap: 1rem;
    opacity: 0;
    transition: opacity 0.6s ease;
}

.landing-buttons.visible {
    opacity: 1;
}

.page-content-hidden {
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    transition: opacity 0.8s ease, max-height 0.8s ease;
}

.page-content-visible {
    opacity: 1;
    max-height: none;
    overflow: visible;
}

/* --- Home Services --- */
.home-services {
    margin-bottom: 3rem;
}

.home-service-list {
    margin-top: 2rem;
}

.home-service {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    padding: 1.5rem 0;
    border-bottom: 1px solid var(--sidebar-border);
    text-decoration: none;
    color: var(--text);
    transition: all var(--transition);
}

.home-service:first-child {
    border-top: 1px solid var(--sidebar-border);
}

.home-service:hover {
    color: var(--heading);
    padding-left: 0.5rem;
}

.home-service-icon {
    width: 48px;
    height: 48px;
    object-fit: contain;
    flex-shrink: 0;
    margin-top: 0.25rem;
    opacity: 0.7;
    transition: opacity var(--transition);
}

.home-service:hover .home-service-icon {
    opacity: 1;
}

.home-service h3 {
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 1.2rem;
    font-weight: 400;
    margin: 0 0 0.4rem 0;
    color: var(--heading);
}

.home-service p {
    font-size: 0.95rem;
    line-height: 1.6;
    color: #666;
    margin: 0;
    max-width: none;
}

/* --- Home Badges --- */
.home-badges {
    margin: 3rem 0;
}

.home-badges h2 {
    margin-top: 0;
}

.home-badges .badges img {
    height: 50px;
}

/* --- Stat / Highlight Block --- */
.highlight-block {
    border-left: 4px solid var(--accent);
    padding: 1.25rem 1.5rem;
    margin: 2rem 0;
    background: #fff;
}

.highlight-block p {
    margin-bottom: 0.5rem;
}

.highlight-block p:last-child {
    margin-bottom: 0;
}

/* --- Dark Section (Why Custodia, etc.) --- */
.dark-section {
    background: var(--dark);
    color: #ddd;
    margin-left: calc(-1 * var(--content-pad));
    margin-right: calc(-1 * var(--content-pad));
    padding: var(--content-pad);
    margin-top: 3rem;
    margin-bottom: 3rem;
}

.dark-section h2 {
    color: #fff;
}

.dark-section h2:first-child {
    margin-top: 0;
}

.dark-section p {
    font-size: 1.1rem;
}

.dark-section a {
    color: var(--accent);
}

.dark-section a:hover {
    color: #fff;
}

/* --- CTA Section --- */
.cta-section {
    border-top: 4px solid var(--accent);
    padding-top: 3rem;
    margin-top: 3rem;
}

.cta-section h2 {
    margin-top: 0;
}

.cta-section--flush {
    border-top: none;
    margin-top: 1rem;
    padding-top: 0;
}

.cta-grid {
    display: flex;
    gap: 3rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

.cta-item {
    flex: 1;
    min-width: 200px;
}

.cta-item .label {
    font-size: 0.85rem;
    color: #888;
    margin-bottom: 0.25rem;
}

.cta-item a {
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 1.15rem;
    font-weight: 400;
}

/* --- Badges / Certifications --- */
.badges {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    align-items: center;
    margin: 2rem 0;
}

.badges img {
    height: 60px;
    width: auto;
}

/* --- Footer --- */
.site-footer {
    margin-left: var(--sidebar-width);
    border-top: 1px solid var(--sidebar-border);
    padding: 3rem var(--content-pad);
    color: #888;
    font-size: 0.85rem;
}

.footer-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    align-items: center;
    margin-bottom: 2rem;
}

.footer-badges img {
    height: 50px;
    width: auto;
}

.footer-addresses {
    margin-bottom: 1rem;
}

.footer-addresses p {
    margin-bottom: 0.25rem;
}

.footer-legal {
    font-size: 0.8rem;
    color: #aaa;
}

.footer-legal a {
    color: #999;
}

/* --- Use Case Cards (AI page) --- */
.use-case-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
    margin: 2rem 0;
}

.use-case-item {
    background: #fff;
    border: 1px solid var(--sidebar-border);
    border-left: 3px solid var(--accent);
    padding: 1.25rem;
}

.use-case-item h3 {
    margin-top: 0;
    font-size: 1rem;
    margin-bottom: 0.4rem;
}

.use-case-item p {
    font-size: 0.88rem;
    color: #555;
    margin-bottom: 0;
}

.use-case-idea {
    background: var(--accent);
    padding: 1.5rem;
    font-family: Georgia, 'Times New Roman', serif;
    font-style: italic;
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--heading);
    transform: rotate(-1deg);
    box-shadow: 2px 3px 8px rgba(0,0,0,0.1);
}

.use-case-idea:nth-child(11) {
    transform: rotate(0.5deg);
}

.use-case-idea:nth-child(12) {
    transform: rotate(-0.8deg);
}

.use-case-idea p {
    margin: 0;
    max-width: none;
}

/* --- Training table --- */
.training-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    font-size: 0.95rem;
}

.training-table th {
    text-align: left;
    padding: 0.75rem 1rem;
    border-bottom: 2px solid var(--heading);
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.training-table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--sidebar-border);
    vertical-align: top;
}

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

/* --- Training tabs --- */
.training-tabs {
    display: flex;
    gap: 0;
    margin: 2rem 0 0 0;
    border-bottom: 2px solid var(--sidebar-border);
}

.training-tab {
    padding: 0.6rem 1.25rem;
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 0.95rem;
    font-weight: 400;
    font-style: italic;
    letter-spacing: 0;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    color: #888;
    transition: all var(--transition);
    background: none;
    border-top: none;
    border-left: none;
    border-right: none;
}

.training-tab:hover {
    color: var(--heading);
}

.training-tab.active {
    color: var(--heading);
    font-style: normal;
    border-bottom-color: var(--accent);
}

.training-panel {
    display: none;
    padding-top: 1.5rem;
}

.training-panel.active {
    display: block;
}

/* --- Pricing tiers --- */
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin: 2rem 0;
}

.pricing-card {
    background: #fff;
    border: 1px solid var(--sidebar-border);
    border-top: 3px solid var(--accent);
    padding: 2rem;
    text-align: left;
}

.pricing-card h3 {
    margin-top: 0;
    font-size: 1.1rem;
}

.pricing-card .tier-detail {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 0.5rem;
}

.pricing-card .price {
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 1.4rem;
    font-weight: 400;
    color: var(--heading);
}

/* --- Testimonials --- */
.testimonial {
    border-left: 4px solid var(--accent);
    padding: 1.5rem 0 1.5rem 1.5rem;
    margin: 2rem 0;
    font-style: italic;
    color: #555;
}

.testimonial .attribution {
    font-style: normal;
    font-weight: 600;
    color: var(--heading);
    margin-top: 0.75rem;
    font-size: 0.9rem;
}

/* --- Checklist --- */
.checklist {
    list-style: none;
    padding: 0;
}

.checklist li {
    padding-left: 1.5rem;
    position: relative;
    margin-bottom: 0.5rem;
}

.checklist li::before {
    content: "\2714";
    position: absolute;
    left: 0;
    color: var(--accent);
    font-weight: 700;
}

/* --- Button --- */
.btn {
    display: inline-block;
    padding: 0.7rem 2rem;
    text-indent: 0;
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 0.95rem;
    font-weight: 400;
    text-transform: none;
    letter-spacing: 0.02em;
    border: 1px solid var(--heading);
    color: var(--heading);
    background: transparent;
    transition: all var(--transition);
    cursor: pointer;
}

.btn:hover {
    background: var(--heading);
    color: #fff;
}

.btn-accent {
    border-color: var(--accent);
    background: var(--accent);
    color: var(--heading);
}

.btn-accent:hover {
    background: #e8b84a;
    border-color: #e8b84a;
    color: var(--heading);
}

/* --- Figure --- */
figure {
    margin: 2rem 0;
}

figcaption {
    font-size: 0.85rem;
    color: #888;
    margin-top: 0.5rem;
}

/* --- Mobile hamburger --- */
.mobile-header {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: var(--sidebar-bg);
    border-bottom: 1px solid var(--sidebar-border);
    z-index: 200;
    align-items: center;
    padding: 0 1.25rem;
    justify-content: space-between;
}

.mobile-header img {
    height: 32px;
    width: auto;
}

.hamburger {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.hamburger span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--heading);
    transition: all var(--transition);
}

.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.3);
    z-index: 99;
}

/* --- Responsive --- */
@media (max-width: 1024px) {
    :root {
        --content-pad: 48px;
    }
}

@media (max-width: 768px) {
    :root {
        --content-pad: 24px;
    }

    .mobile-header {
        display: flex;
    }

    .sidebar {
        transform: translateX(-100%);
        transition: transform var(--transition);
        width: 280px;
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .sidebar-overlay.open {
        display: block;
    }

    .content {
        margin-left: 0;
        padding-top: 60px;
    }

    .site-footer {
        margin-left: 0;
        padding: 2rem var(--content-pad);
    }

    h1 {
        font-size: 2.2rem;
    }

    h2 {
        font-size: 1.4rem;
    }

    .landing {
        padding-top: 2rem;
    }

    .landing-heading {
        font-size: 2.2rem;
    }

    .typed-line {
        font-size: 1.4rem;
        height: 2rem;
    }

    .home-service {
        gap: 1rem;
    }

    .home-service-icon {
        width: 36px;
        height: 36px;
    }

    article h2 + p,
    article h2 + p + p {
        text-indent: 1em;
    }

    .use-case-grid {
        grid-template-columns: 1fr 1fr;
    }

    .pricing-grid {
        grid-template-columns: 1fr;
    }

    .dark-section {
        margin-left: calc(-1 * var(--content-pad));
        margin-right: calc(-1 * var(--content-pad));
        padding: 2rem var(--content-pad);
    }

    .training-tabs {
        flex-wrap: wrap;
    }

    .cta-grid {
        flex-direction: column;
        gap: 1.5rem;
    }
}

@media (max-width: 480px) {
    .use-case-grid {
        grid-template-columns: 1fr;
    }

    .footer-badges {
        gap: 1rem;
    }

    .footer-badges img {
        height: 40px;
    }

    .badges img {
        height: 45px;
    }
}
