/* ═══════════════════════════════════════════
   Ortic.AI Premium Custom Theme — Refined Light
   ═══════════════════════════════════════════ */

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

:root {
    /* Color Palette */
    --accent: #2563eb;          /* Royal blue */
    --accent-light: #60a5fa;
    --accent-dark: #1d4ed8;
    --accent-gradient: linear-gradient(135deg, #2563eb 0%, #4f46e5 100%);
    
    --surface: #ffffff;
    --surface-alt: #f8fafc;     /* Subtle slate */
    --surface-hover: #f1f5f9;
    
    --text: #0f172a;            /* Deep slate */
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    
    --border: #e2e8f0;
    --border-light: #f1f5f9;

    --glass-bg: rgba(255, 255, 255, 0.85);
    --glass-border: rgba(255, 255, 255, 0.4);
    --glass-blur: blur(20px) saturate(1.4);

    /* Refined, layered shadows (Apple/Stripe style) */
    --shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.04);
    --shadow-sm: 0 2px 4px rgba(15, 23, 42, 0.04), 0 1px 2px rgba(15, 23, 42, 0.02);
    --shadow-md: 0 4px 6px -1px rgba(15, 23, 42, 0.05), 0 2px 4px -1px rgba(15, 23, 42, 0.03);
    --shadow-lg: 0 10px 15px -3px rgba(15, 23, 42, 0.06), 0 4px 6px -2px rgba(15, 23, 42, 0.03);
    --shadow-xl: 0 20px 25px -5px rgba(15, 23, 42, 0.06), 0 10px 10px -5px rgba(15, 23, 42, 0.02), 0 0 0 1px rgba(15, 23, 42, 0.01);
    
    --shadow-glow: 0 8px 24px -6px rgba(37, 99, 235, 0.3);

    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 24px;

    --transition: 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    line-height: 1.75;
    color: var(--text);
    background-color: #fdfdfd;
    /* Subtle dot matrix background for beautiful texture */
    background-image: radial-gradient(var(--border) 1px, transparent 1px);
    background-size: 24px 24px;
    background-position: -12px -12px;
    background-attachment: fixed;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
}

/* ─── Navigation ──────────────────────────── */

.site-nav {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-bottom: 1px solid var(--border);
    transition: background 0.3s, border-bottom 0.3s;
}

.nav-inner {
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.site-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    transition: transform var(--transition);
}

.site-logo:hover {
    transform: scale(0.98);
}

.logo-mark {
    font-size: 24px;
    color: var(--accent);
}

.logo-text {
    font-size: 19px;
    font-weight: 800;
    color: var(--text);
    letter-spacing: -0.03em;
}

.nav-links {
    display: flex;
    gap: 6px;
    list-style: none;
}

.nav-links a {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    text-decoration: none;
    padding: 10px 16px;
    border-radius: var(--radius-sm);
    transition: all var(--transition);
    position: relative;
    overflow: hidden;
}

/* Subte background reveal on hover */
.nav-links a::after {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--surface-hover);
    z-index: -1;
    border-radius: var(--radius-sm);
    transform: scale(0.8);
    opacity: 0;
    transition: all var(--transition);
}

.nav-links a:hover {
    color: var(--accent-dark);
}

.nav-links a:hover::after {
    transform: scale(1);
    opacity: 1;
}

/* ─── Hamburger Button ────────────────────── */

.hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 38px;
    height: 38px;
    padding: 8px;
    background: transparent;
    border: 1px solid transparent;
    cursor: pointer;
    z-index: 110;
    border-radius: var(--radius-sm);
    transition: all var(--transition);
}

.hamburger:hover {
    background: var(--surface-hover);
    border-color: var(--border);
}

.hamburger span {
    display: block;
    width: 100%;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: transform 0.3s, opacity 0.3s;
}

.hamburger.is-active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.is-active span:nth-child(2) { opacity: 0; }
.hamburger.is-active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ─── Dropdown Menus ──────────────────────── */

.has-dropdown {
    position: relative;
}

.dropdown-arrow {
    font-size: 12px;
    opacity: 0.5;
    margin-left: 6px;
    transition: transform var(--transition);
    display: inline-block;
}

.has-dropdown:hover .dropdown-arrow {
    transform: rotate(180deg);
}

.dropdown-menu {
    visibility: hidden;
    opacity: 0;
    transform: translateY(10px) scale(0.98);
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    min-width: 240px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-xl);
    padding: 8px;
    list-style: none;
    z-index: 120;
    transition: all var(--transition);
    transform-origin: top center;
}

.has-dropdown:hover > .dropdown-menu {
    visibility: visible;
    opacity: 1;
    transform: translateY(0) scale(1);
}

.dropdown-menu a {
    display: block;
    padding: 10px 14px;
    font-size: 14px;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 6px;
    transition: all var(--transition);
}

.dropdown-menu a:hover {
    color: var(--accent-dark);
    background: var(--surface-hover);
    transform: translateX(4px);
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.lang-switcher {
    display: flex;
    gap: 4px;
    padding: 4px;
    background: var(--surface-alt);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
}

.lang-switcher__current,
.lang-switcher__link {
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 700;
    border-radius: 6px;
    text-decoration: none;
    transition: all var(--transition);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.lang-switcher__current {
    background: var(--surface);
    color: var(--accent-dark);
    box-shadow: var(--shadow-sm);
}

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

.lang-switcher__link:hover {
    color: var(--text-secondary);
}

.nav-cta {
    padding: 10px 24px;
    background: var(--accent-gradient);
    color: white;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    border-radius: var(--radius-sm);
    transition: all var(--transition);
    box-shadow: var(--shadow-sm);
}

.nav-cta:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-glow);
}

/* ─── Main Content ────────────────────────── */

.site-main {
    max-width: 100%;
    min-height: calc(100vh - 200px);
}

.site-main > *:not(.sc-hero):not(.sc-cta):not(.sc-section):not(section) {
    max-width: 760px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 32px;
    padding-right: 32px;
}

/* ─── Typography ──────────────────────────── */

.site-main h1 {
    font-size: 48px;
    font-weight: 900;
    line-height: 1.15;
    color: var(--text);
    margin-top: 12px;
    margin-bottom: 16px;
    letter-spacing: -0.04em;
    font-feature-settings: "cv02", "cv03", "cv04", "cv11";
}

.site-main h2 {
    font-size: 32px;
    font-weight: 800;
    color: var(--text);
    margin: 56px 0 24px;
    letter-spacing: -0.03em;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-light);
}

.site-main h3 {
    font-size: 22px;
    font-weight: 700;
    color: var(--text);
    margin: 36px 0 16px;
    letter-spacing: -0.02em;
}

.site-main p {
    margin-bottom: 24px;
    color: var(--text-secondary);
    font-size: 17px;
    line-height: 1.75;
}

/* Subtle sliding underline detail for links */
.site-main a:not(.sc-button):not(.sc-card__link):not(.nav-cta) {
    color: var(--accent);
    text-decoration: none;
    font-weight: 500;
    background-image: linear-gradient(var(--accent-light), var(--accent-light));
    background-size: 0% 2px;
    background-repeat: no-repeat;
    background-position: 100% 100%;
    transition: background-size 0.3s ease;
}

.site-main a:not(.sc-button):not(.sc-card__link):not(.nav-cta):hover {
    background-size: 100% 2px;
    background-position: 0 100%;
}

.site-main ul, .site-main ol {
    margin: 0 0 24px 24px;
    color: var(--text-secondary);
}

.site-main li { 
    margin-bottom: 10px; 
    font-size: 17px; 
    padding-left: 8px;
}

.site-main li::marker {
    color: var(--accent-light);
}

.site-main strong { 
    color: var(--text); 
    font-weight: 600; 
}

/* Elegant quote styling */
.site-main blockquote {
    position: relative;
    border-left: 3px solid var(--accent);
    padding: 24px 32px;
    margin: 40px 0;
    background: linear-gradient(to right, rgba(37, 99, 235, 0.05), transparent);
    color: var(--text-secondary);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    font-style: italic;
    font-size: 18px;
    line-height: 1.8;
}

.site-main blockquote::before {
    content: '"';
    position: absolute;
    top: -10px;
    left: 16px;
    font-size: 60px;
    font-family: serif;
    color: rgba(37, 99, 235, 0.1);
    line-height: 1;
}

.site-main code {
    background: var(--surface-alt);
    padding: 3px 6px;
    border-radius: 6px;
    font-size: 0.88em;
    color: #e11d48; /* Crimson for inline code */
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
    border: 1px solid var(--border);
}

/* Mac-style code blocks with colored dots */
.site-main pre {
    position: relative;
    background: #0f172a;
    color: #f8fafc;
    padding: 48px 24px 24px;
    border-radius: var(--radius-md);
    overflow-x: auto;
    margin: 36px 0;
    box-shadow: var(--shadow-md);
}

.site-main pre::before {
    content: '';
    position: absolute;
    top: 16px;
    left: 16px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #ef4444; /* Close */
    box-shadow: 20px 0 0 #f59e0b, 40px 0 0 #22c55e; /* Min, Max */
}

.site-main pre code {
    background: none;
    border: none;
    padding: 0;
    color: inherit;
    font-size: 0.9em;
    line-height: 1.6;
}

.site-main img {
    max-width: 100%;
    border-radius: var(--radius-md);
    margin: 40px 0;
    box-shadow: var(--shadow-lg);
    border: 1px solid rgba(0,0,0,0.05); /* very subtle stroke */
    display: block;
}

/* Tables with refined lines and striped hover */
.site-main table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin: 40px 0;
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--border);
    background: var(--surface);
    box-shadow: var(--shadow-sm);
}

.site-main th, .site-main td {
    padding: 16px 24px;
    text-align: left;
    font-size: 15px;
    border-bottom: 1px solid var(--border);
}

.site-main th {
    background: var(--surface-alt);
    font-weight: 600;
    color: var(--text);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.site-main tr:last-child td {
    border-bottom: none;
}

.site-main tbody tr {
    transition: background var(--transition);
}

.site-main tbody tr:hover {
    background: var(--surface-hover);
}

/* ═══════════════════════════════════════════
   SHORTCODE COMPONENTS
   ═══════════════════════════════════════════ */

/* ─── Hero Section ────────────────────────── */

.sc-hero {
    text-align: center;
    padding: 60px 32px 40px;
    max-width: 100%;
    background: radial-gradient(ellipse at top, #f1f5f9 0%, transparent 70%);
    position: relative;
    overflow: hidden;
}

.sc-hero.hero-sm {
    padding: 40px 32px 30px;
}

/* Refined animated background element */
.sc-hero::after {
    content: '';
    position: absolute;
    width: 800px;
    height: 800px;
    top: -400px;
    left: 50%;
    transform: translateX(-50%);
    background: radial-gradient(circle, rgba(37, 99, 235, 0.05) 0%, transparent 60%);
    z-index: -1;
    pointer-events: none;
}

.sc-hero h1 {
    font-size: 64px;
    font-weight: 900;
    line-height: 1.1;
    letter-spacing: -0.04em;
    max-width: 900px;
    margin: 0 auto 24px;
    color: var(--text);
}

.sc-hero p {
    font-size: 20px;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 40px;
    line-height: 1.7;
}

/* ─── Buttons ─────────────────────────────── */

.sc-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 32px;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    border-radius: var(--radius-sm);
    transition: all var(--transition);
    cursor: pointer;
    margin: 8px;
    letter-spacing: 0.02em;
    outline: none;
}

.sc-button:focus-visible {
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.4);
}

.sc-button--primary {
    background: var(--accent-gradient);
    color: white;
    box-shadow: var(--shadow-sm);
    border: 1px solid transparent;
}

.sc-button--primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

.sc-button--secondary {
    background: var(--surface);
    color: var(--text);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-xs);
}

.sc-button--secondary:hover {
    background: var(--surface-hover);
    border-color: #cbd5e1;
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

/* ─── Cards ───────────────────────────────── */

.sc-cards {
    display: grid;
    gap: 24px;
    padding: 0;
    max-width: 1120px;
    margin: 40px auto;
}

.sc-cards--2 { grid-template-columns: repeat(2, 1fr); }
.sc-cards--3 { grid-template-columns: repeat(3, 1fr); }
.sc-cards--4 { grid-template-columns: repeat(4, 1fr); }

.sc-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 32px;
    transition: all var(--transition);
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
}

/* Detail: A tiny accent bar at the top of the card that expands */
.sc-card::before {
    content: '';
    display: block;
    width: 32px;
    height: 3px;
    background: var(--accent);
    border-radius: 3px;
    margin-bottom: 24px;
    transition: width var(--transition);
}

.sc-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-xl);
    border-color: #cbd5e1;
}

.sc-card:hover::before {
    width: 48px;
}

.sc-card__icon {
    font-size: 34px;
    margin-bottom: 20px;
    display: inline-block;
    color: var(--text);
    /* 
     * Tints emojis to a rich spectrum of blues:
     * 1. Grayscale removes native colors
     * 2. Sepia + Hue Rotate shifts all tones into the Royal Blue region
     * 3. Saturate makes it pop
     * This preserves the detailing and creates a beautiful monochromatic 3D look
     */
    filter: grayscale(100%) sepia(100%) hue-rotate(180deg) saturate(350%) brightness(0.95) drop-shadow(0 4px 12px rgba(37, 99, 235, 0.3));
    
    /* Fallback for SVGs */
    fill: var(--accent);
}

.sc-card__body {
    flex-grow: 1;
}

.sc-card__body h3 {
    font-size: 19px;
    font-weight: 700;
    color: var(--text);
    margin: 0 0 10px;
    letter-spacing: -0.01em;
}

.sc-card__body p {
    font-size: 15px;
    line-height: 1.65;
    color: var(--text-secondary);
    margin-bottom: 24px;
}

/* Detail: Arrow animation on link hover */
.sc-card__link {
    display: inline-flex;
    align-items: center;
    font-size: 14px;
    font-weight: 600;
    color: var(--accent);
    text-decoration: none;
    margin-top: auto;
    transition: all var(--transition);
}

.sc-card__link::after {
    content: '→';
    margin-left: 6px;
    transition: transform var(--transition);
}

.sc-card__link:hover {
    color: var(--accent-dark);
}

.sc-card__link:hover::after {
    transform: translateX(4px);
}

/* ─── Sections ────────────────────────────── */

.sc-section {
    padding: 48px 32px;
    max-width: 100%;
}

.sc-section > h2,
.sc-section > p {
    text-align: center;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.sc-section.alt {
    background: var(--surface-alt);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

/* ─── Columns ─────────────────────────────── */

.sc-columns {
    display: grid;
    gap: 48px;
    max-width: 1120px;
    margin: 40px auto;
    padding: 0;
}

.sc-columns--2 { grid-template-columns: repeat(2, 1fr); }
.sc-columns--3 { grid-template-columns: repeat(3, 1fr); }
.sc-columns--4 { grid-template-columns: repeat(4, 1fr); }

.sc-column h3 { margin-top: 0; }

/* ─── CTA Section ─────────────────────────── */

.sc-cta {
    text-align: center;
    padding: 100px 32px;
    background: var(--text); /* Very dark section on light theme for contrast */
    max-width: 100%;
    border-radius: var(--radius-lg);
    margin: 40px auto;
    max-width: calc(100% - 64px); /* Floating CTA effect */
    box-shadow: var(--shadow-xl);
}

.sc-cta h2 {
    color: white;
    font-size: 36px;
    margin-bottom: 16px;
    letter-spacing: -0.02em;
}

.sc-cta p {
    color: var(--text-muted);
    font-size: 18px;
    max-width: 550px;
    margin: 0 auto 36px;
}

/* ─── Forms ───────────────────────────────── */

.sc-form {
    max-width: 500px;
    margin: 0 auto;
    background: var(--surface);
    padding: 40px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-md);
}

.sc-form__field {
    margin-bottom: 24px;
}

.sc-form__label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 8px;
}

.sc-form__input {
    width: 100%;
    padding: 14px 16px;
    font-size: 15px;
    font-family: inherit;
    color: var(--text);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    transition: all var(--transition);
    outline: none;
    box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.02);
}

.sc-form__input:focus {
    border-color: var(--accent-light);
    box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.02), 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.sc-form__input::placeholder {
    color: var(--text-muted);
}

.sc-form__textarea {
    resize: vertical;
    min-height: 120px;
}

.sc-form__submit {
    width: 100%;
    margin-top: 8px;
    background: var(--text);
    color: white;
    font-weight: 600;
    font-size: 15px;
    padding: 14px;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition);
}

.sc-form__submit:hover {
    background: #000;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

/* ─── Footer ──────────────────────────────── */

.site-footer {
    background: var(--surface);
    color: var(--text-secondary);
    padding: 64px 32px 40px;
    border-top: 1px solid var(--border);
}

.footer-inner {
    max-width: 1120px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 2fr 1fr;
    gap: 40px;
    align-items: start;
}

.footer-brand {
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer-brand .logo-mark {
    color: var(--accent);
}

.footer-links {
    display: flex;
    gap: 24px;
    justify-content: center;
    flex-wrap: wrap;
}

.footer-links a {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    text-decoration: none;
    transition: color var(--transition);
}

.footer-links a:hover {
    color: var(--text);
}

.footer-copy {
    text-align: right;
    font-size: 13px;
    color: var(--text-muted);
}

/* ─── Responsive ──────────────────────────── */

@media (max-width: 900px) {
    .sc-cards--3, .sc-cards--4 { grid-template-columns: repeat(2, 1fr); }
    .sc-columns--3, .sc-columns--4 { grid-template-columns: repeat(2, 1fr); }
    .footer-inner { grid-template-columns: 1fr; text-align: center; }
    .footer-copy { text-align: center; }
}

@media (max-width: 640px) {
    .site-main h1, .sc-hero h1 { font-size: 38px; }
    .sc-hero.hero-sm h1 { font-size: 32px; }
    .sc-hero { padding: 40px 20px 30px; }
    .sc-hero.hero-sm { padding: 30px 20px 20px; }
    .sc-cta { border-radius: 0; max-width: 100%; padding: 60px 20px; margin: 0; }
    
    .sc-cards--2, .sc-cards--3, .sc-cards--4 { grid-template-columns: 1fr; }
    .sc-columns--2, .sc-columns--3, .sc-columns--4 { grid-template-columns: 1fr; }

    .nav-inner { padding: 0 16px; position: relative; }
    
    .nav-links { 
        display: none; 
        width: 100%;
        flex-direction: column;
        background: var(--surface);
        padding: 16px;
        border-bottom: 1px solid var(--border);
        box-shadow: var(--shadow-md);
        position: absolute;
        top: 70px;
        left: 0;
        z-index: 99;
    }
    
    .nav-links.nav-open {
        display: flex;
        animation: fadeIn 0.3s ease;
    }
    
    .nav-right {
        margin-left: auto;
        order: 2;
    }
    
    .hamburger { 
        display: flex; 
        order: 3;
        margin-left: 12px;
    }
}
