/* ═══════════════════════════════════════════
   ALGOTECH — shared inner-page styles
   Loaded after style.css on every page except the homepage.
   Uses the same tokens (colours, fonts) as style.css.
═══════════════════════════════════════════ */
:root {
    --text-soft: #b3ada1;
}

/* Logo as a link + current page in the menu */
a.nav-logo:hover { color: var(--gold-b); }
.nav-links a[aria-current="page"] { color: var(--gold); }

/* ── PAGE HERO ───────────────────────────── */
.page-hero {
    position: relative;
    overflow: hidden;
    text-align: center;
    padding: 160px 48px 80px;
    border-bottom: 1px solid var(--border);
    background:
        radial-gradient(ellipse 70% 60% at 50% 0%, rgba(200, 169, 78, .13), transparent 70%),
        var(--black);
}

.page-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(200, 169, 78, .04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(200, 169, 78, .04) 1px, transparent 1px);
    background-size: 60px 60px;
    -webkit-mask-image: radial-gradient(ellipse at 50% 20%, #000 30%, transparent 75%);
    mask-image: radial-gradient(ellipse at 50% 20%, #000 30%, transparent 75%);
    pointer-events: none;
}

.page-hero-inner {
    position: relative;
    max-width: 820px;
    margin: 0 auto;
}

.page-hero .hero-eyebrow { margin-bottom: 24px; }

.page-title {
    font-family: var(--ff-display);
    font-size: clamp(2.2rem, 5.5vw, 3.8rem);
    font-weight: 700;
    letter-spacing: 2px;
    line-height: 1.1;
    color: var(--text);
}

.page-title span { color: var(--gold); }

.page-lead {
    font-size: 1.05rem;
    font-weight: 300;
    color: var(--text-soft);
    max-width: 620px;
    margin: 22px auto 0;
    line-height: 1.8;
}

/* ── PAGE BODY ───────────────────────────── */
.page-main {
    max-width: 960px;
    margin: 0 auto;
    padding: 72px 48px 120px;
}

.page-main.wide { max-width: 1200px; }

.panel {
    position: relative;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 48px;
}

.panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 48px;
    right: 48px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--gold-dim), transparent);
}

.panel-title {
    font-family: var(--ff-display);
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 600;
    letter-spacing: 1px;
    line-height: 1.2;
    color: var(--text);
    margin-bottom: 14px;
}

.panel-title span { color: var(--gold); }

.lead {
    color: var(--text-soft);
    font-size: 1.02rem;
    line-height: 1.85;
    margin-bottom: 32px;
}

.rich-text p {
    color: var(--text-soft);
    line-height: 1.9;
    margin-bottom: 20px;
}

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

.callout {
    margin-top: 12px;
    padding: 22px 24px;
    border-left: 2px solid var(--gold);
    background: var(--gold-bg);
    border-radius: 0 8px 8px 0;
    color: var(--text);
    line-height: 1.8;
}

.cta-band {
    margin-top: 40px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 28px 32px;
    border: 1px solid var(--border2);
    border-radius: 12px;
    background: var(--panel2);
}

.cta-band h3 {
    font-family: var(--ff-display);
    font-size: 1.2rem;
    font-weight: 600;
    letter-spacing: 1px;
}

.cta-band p { color: var(--text-soft); font-size: .92rem; }

.btn-primary:hover { background: var(--gold-b); }

/* ── FAQ ACCORDION ───────────────────────── */
.faq-list { display: grid; gap: 12px; }

.faq-item {
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--panel2);
    transition: border-color .25s;
}

.faq-item.active { border-color: var(--gold-dim); }

.faq-question {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 20px 24px;
    background: none;
    border: 0;
    color: var(--text);
    font: 500 1rem/1.5 var(--ff-body);
    text-align: left;
    cursor: pointer;
}

.faq-question:hover { color: var(--gold-b); }

.faq-icon {
    flex: 0 0 auto;
    color: var(--gold);
    font-size: 1.4rem;
    line-height: 1;
    transition: transform .3s ease;
}

.faq-item.active .faq-icon { transform: rotate(45deg); }

.faq-answer-wrap {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows .35s ease;
}

.faq-item.active .faq-answer-wrap { grid-template-rows: 1fr; }

.faq-answer-inner { overflow: hidden; }

.faq-answer {
    padding: 0 24px 22px;
    color: var(--text-soft);
    line-height: 1.85;
}

/* ── CONTACT ─────────────────────────────── */
.contact-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr);
    gap: 32px;
    align-items: start;
}

.contact-info { display: grid; gap: 14px; }

.info-card {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 22px 24px;
}

.info-card .section-tag { margin-bottom: 6px; }

.info-card a, .info-card strong {
    color: var(--text);
    font-weight: 500;
    overflow-wrap: anywhere;
}

.info-card a:hover { color: var(--gold); }

.info-card p { color: var(--text-soft); font-size: .9rem; margin-top: 4px; }

.contact-form { display: grid; gap: 18px; }

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.field { display: grid; gap: 8px; }

.field label {
    font-size: .85rem;
    color: var(--text-soft);
}

.field input,
.field textarea {
    width: 100%;
    padding: 13px 14px;
    background: var(--black);
    border: 1px solid var(--border2);
    border-radius: 6px;
    color: var(--text);
    font: 400 1rem var(--ff-body);
    transition: border-color .2s, box-shadow .2s;
}

.field textarea { min-height: 150px; resize: vertical; }

.field input:focus,
.field textarea:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(200, 169, 78, .15);
}

.website-field {
    position: absolute;
    left: -10000px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.contact-form .btn-primary { width: 100%; }
.contact-form .btn-primary:disabled { opacity: .6; cursor: not-allowed; }

.form-status {
    padding: 12px 16px;
    border-radius: 6px;
    font-size: .92rem;
    border: 1px solid;
}

.form-status.is-success {
    color: #c9f2dc;
    background: rgba(62, 200, 122, .08);
    border-color: rgba(62, 200, 122, .35);
}

.form-status.is-error {
    color: #ffd2cc;
    background: rgba(224, 72, 72, .08);
    border-color: rgba(224, 72, 72, .4);
}

.form-note {
    font-size: .8rem;
    color: var(--muted);
    margin-top: 18px;
    line-height: 1.7;
}

.form-note a { color: var(--gold); }

/* ── BLOG ────────────────────────────────── */
.featured-box {
    display: grid;
    grid-template-columns: 1fr 1fr;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
}

.featured-box img {
    width: 100%;
    height: 100%;
    max-height: 460px;
    object-fit: cover;
    object-position: center top;
    display: block;
}

.featured-content {
    padding: 44px 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.featured-content h2 {
    font-family: var(--ff-display);
    font-size: clamp(1.5rem, 3vw, 2.1rem);
    font-weight: 600;
    letter-spacing: 1px;
    line-height: 1.2;
}

.featured-content p {
    color: var(--text-soft);
    margin-top: 16px;
    line-height: 1.8;
}

.blog-date {
    font-family: var(--ff-mono);
    font-size: .7rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--gold-dim);
    margin-bottom: 10px;
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
    margin-top: 32px;
}

.blog-card {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: border-color .25s, transform .25s;
}

.blog-card:hover {
    border-color: var(--gold-dim);
    transform: translateY(-4px);
}

.blog-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
    background: var(--panel2);
}

.blog-content {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.blog-title {
    font-family: var(--ff-body);
    font-size: 1.12rem;
    font-weight: 600;
    line-height: 1.4;
    color: var(--text);
    margin-bottom: 10px;
}

.blog-desc {
    font-size: .92rem;
    color: var(--text-soft);
    line-height: 1.7;
}

.read-btn {
    margin-top: auto;
    padding-top: 18px;
    font-size: .82rem;
    font-weight: 600;
    letter-spacing: .5px;
    color: var(--gold);
}

.read-btn:hover { color: var(--gold-b); }

/* ── FOOTER links (shared) ───────────────── */
.footer-col ul li a:hover { color: var(--gold); }

/* ── RESPONSIVE ──────────────────────────── */
@media (max-width: 1024px) {
    .blog-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 860px) {
    .contact-grid { grid-template-columns: 1fr; }
    .featured-box { grid-template-columns: 1fr; }
    .featured-box img { max-height: 320px; }
}

@media (max-width: 768px) {
    .page-hero { padding: 120px 20px 56px; }
    .page-main { padding: 48px 20px 80px; }
    .panel { padding: 32px 22px; }
    .panel::before { left: 22px; right: 22px; }
    .form-row { grid-template-columns: 1fr; }
    .faq-question { padding: 18px; }
    .faq-answer { padding: 0 18px 18px; }
    .featured-content { padding: 28px 22px; }
    .cta-band { padding: 24px 22px; }
    footer { padding: 48px 20px 28px; }
}

@media (max-width: 640px) {
    .blog-grid { grid-template-columns: 1fr; }
}
