/* Shared subpage layout — container, hero, sections, spacing */
html { scroll-behavior: smooth; }
body {
    background: var(--bg);
    color: var(--text-main);
    font-family: var(--font-body);
    font-size: 18px;
}

.container {
    width: min(1080px, calc(100% - 3rem));
    margin-left: auto;
    margin-right: auto;
    box-sizing: border-box;
}
@media (min-width: 1400px) {
    .container { width: min(1080px, calc(100% - 4rem)); }
}

/* Page hero */
.page-hero {
    position: relative;
    padding: var(--space-hero-top) 0 var(--space-hero-bottom);
    overflow: visible;
}
.page-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: radial-gradient(ellipse 70% 55% at 50% 42%, rgba(139,92,246,0.1) 0%, transparent 68%);
}
.page-hero .container { position: relative; z-index: 1; }
.breadcrumb {
    font-size: 0.78rem;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: var(--text-muted);
    font-weight: 600;
    margin-bottom: 1.5rem;
}
.breadcrumb a { color: var(--accent); text-decoration: none; }
.page-hero h1 {
    font-family: var(--font-head);
    font-size: clamp(1.5rem, 8vw, 4.2rem);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: -0.02em;
    line-height: 1.08;
    margin: 0;
    overflow-wrap: anywhere;
    max-width: 100%;
}
.page-hero h1 .accent { color: var(--accent); }
.page-desc {
    margin-top: 1.2rem;
    max-width: 560px;
    color: #fff;
    font-size: 1.1rem;
    line-height: 1.7;
    font-weight: 500;
}

/* Sections — matching pad; stacked tops collapse so space-between stays even */
.page-section { padding: var(--space-section-y) 0; }
.page-section.is-tight,
.page-hero + .page-section,
.page-section + .page-section,
.page-section + .cta-band { padding-top: 0; }

/* Services list */
.svc-list { display: flex; flex-direction: column; }
.svc-row {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 1.1rem 1.4rem;
    padding: 28px 0;
    border-top: 1px solid rgba(255,255,255,0.08);
    scroll-margin-top: 100px;
    transition: border-color 0.3s;
}
a.svc-row {
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}
a.svc-row:hover h2 { color: var(--accent); }
.svc-row:last-child { border-bottom: 1px solid rgba(255,255,255,0.08); }
.svc-row:hover { border-top-color: rgba(216,180,254,0.4); }
.svc-num {
    font-family: var(--font-num);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    color: var(--accent);
    padding-top: 0.3rem;
}
.svc-row h2 {
    font-family: var(--font-head);
    font-size: clamp(0.95rem, 1.5vw, 1.15rem);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin: 0 0 0.5rem;
    transition: color 0.3s;
}
.svc-row p {
    margin: 0;
    color: #fff;
    font-size: 1.05rem;
    line-height: 1.65;
    font-weight: 500;
    max-width: 42rem;
}

/* Blog grid */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}
.blog-card {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    padding-bottom: 1.5rem;
    transition: transform 0.3s, border-color 0.3s;
}
.blog-card:hover { transform: translateY(-4px); border-color: rgba(216,180,254,0.35); }
.blog-thumb {
    aspect-ratio: 16/10;
    background: rgba(255,255,255,0.04) center/cover no-repeat;
    margin-bottom: 1.2rem;
}
.blog-cat {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--accent);
}
.blog-card h3 {
    font-family: var(--font-head);
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    line-height: 1.35;
    margin: 0.55rem 0;
}
.blog-card p {
    color: #fff;
    font-size: 0.98rem;
    line-height: 1.6;
    font-weight: 500;
    margin: 0;
}

/* Blog post */
.post-section { padding: 0 0 var(--space-section-y); }
.post-wrap { max-width: 760px; }
.post-wrap .meta {
    font-size: 0.75rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--accent);
    font-weight: 700;
    margin-bottom: 1.2rem;
}
.post-wrap h1 {
    font-family: var(--font-head);
    font-size: clamp(1.35rem, 6.5vw, 2.6rem);
    text-transform: uppercase;
    letter-spacing: -0.02em;
    line-height: 1.15;
    margin-bottom: 1.5rem;
    overflow-wrap: anywhere;
}
.post-wrap p {
    color: #fff;
    font-size: 1.08rem;
    line-height: 1.85;
    font-weight: 500;
    margin-bottom: 1.2rem;
}
.post-wrap h2 {
    font-family: var(--font-head);
    font-size: clamp(1.05rem, 2.4vw, 1.35rem);
    text-transform: uppercase;
    letter-spacing: 0.02em;
    line-height: 1.3;
    color: #fff;
    margin: 2.4rem 0 1rem;
}
.post-wrap h3 {
    font-family: var(--font-body);
    font-size: 1.18rem;
    font-weight: 700;
    color: #fff;
    margin: 1.7rem 0 0.7rem;
}
.post-wrap ul,
.post-wrap ol {
    color: #fff;
    font-size: 1.08rem;
    line-height: 1.75;
    font-weight: 500;
    margin: 0 0 1.2rem 1.25rem;
    padding: 0;
}
.post-wrap li { margin-bottom: 0.45rem; }
.post-wrap strong { color: #fff; font-weight: 700; }
.post-back {
    display: inline-block;
    margin-top: 2rem;
    color: var(--accent);
    text-decoration: none;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    font-size: 0.8rem;
}

/* Contact */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.15fr;
    gap: 64px;
    align-items: start;
}
.contact-info p {
    color: #fff;
    line-height: 1.8;
    font-weight: 500;
    margin: 0 0 1.2rem;
    overflow-wrap: break-word;
}
.contact-info a { color: var(--accent); text-decoration: none; }
.contact-info .footer-socials { margin-top: 1.6rem; }
.contact-info a:hover { text-decoration: underline; }
.hp-field {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}
.input-group { margin-bottom: 1.4rem; position: relative; }
.input-group input,
.input-group textarea,
.input-group select {
    width: 100%;
    background: transparent;
    border: none;
    border-bottom: 1px solid rgba(255,255,255,0.2);
    padding: 1rem 0;
    color: #fff;
    font-size: 1.05rem;
    font-family: var(--font-body);
    outline: none;
}
.input-group textarea { resize: vertical; min-height: 120px; }
.input-group select {
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
    padding-right: 1.6rem;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%23d8b4fe' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.15rem center;
}
.input-group select option { color: #111; background: #fff; }
.input-group label {
    position: absolute;
    top: 1rem;
    left: 0;
    color: #fff;
    font-size: 0.8rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    pointer-events: none;
    transition: 0.3s;
}
.input-group input:focus + label,
.input-group input:not(:placeholder-shown) + label,
.input-group textarea:focus + label,
.input-group textarea:not(:placeholder-shown) + label,
.input-group select:focus + label,
.input-group select:valid + label {
    top: -0.6rem;
    font-size: 0.68rem;
    color: var(--accent);
}
.submit-btn,
.cta-btn,
.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: #fff;
    color: #000;
    border: none;
    border-radius: 100px;
    padding: 1.05rem 2.2rem;
    font-family: var(--font-body);
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    font-size: 0.85rem;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.3s, transform 0.3s;
}
.submit-btn:hover,
.cta-btn:hover,
.btn-primary:hover {
    background: var(--accent);
    transform: translateY(-2px);
}
.submit-btn:disabled {
    opacity: 0.7;
    cursor: wait;
    transform: none;
}
.form-status {
    margin: 0 0 1rem;
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.5;
}
.form-status.is-ok { color: #86efac; }
.form-status.is-err { color: #fca5a5; }

/* Legal */
.legal-section { margin-bottom: 2.5rem; }
.legal-section h2 {
    font-family: var(--font-head);
    font-size: 1.05rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--accent);
    margin-bottom: 1rem;
    padding-bottom: 0.7rem;
    border-bottom: 1px solid rgba(216,180,254,0.12);
}
.legal-section p,
.legal-section li {
    color: #fff;
    font-size: 1.05rem;
    line-height: 1.8;
    font-weight: 500;
    margin-bottom: 0.8rem;
}
.legal-section ul { list-style: none; padding: 0; }
.legal-section li { padding-left: 1.2rem; position: relative; }
.legal-section li::before { content: '–'; position: absolute; left: 0; color: var(--accent); }
.legal-section a { color: var(--accent); text-decoration: none; }

/* CTA band */
.cta-band {
    padding: var(--space-cta-y) 0;
    text-align: center;
    border-top: 1px solid rgba(255,255,255,0.06);
    position: relative;
}
.cta-band::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 55% 60% at 50% 50%, rgba(139,92,246,0.1) 0%, transparent 70%);
    pointer-events: none;
}
.cta-band .container { position: relative; z-index: 1; }
.cta-band h2 {
    font-family: var(--font-head);
    font-size: clamp(1.6rem, 3.5vw, 2.6rem);
    text-transform: uppercase;
    letter-spacing: -0.02em;
    margin: 0 0 1.8rem;
}

/* Footer: keep shared top/bottom rhythm; container handles horizontal inset */
footer {
    padding-top: var(--space-footer-top);
    padding-bottom: calc(var(--space-footer-bottom) + env(safe-area-inset-bottom, 0px));
    padding-left: 0;
    padding-right: 0;
}

@media (max-width: 1024px) {
    .page-hero h1 { font-size: clamp(1.7rem, 6vw, 3.2rem); overflow-wrap: anywhere; }
    .blog-grid { grid-template-columns: 1fr 1fr; }
    .contact-grid { gap: 2.5rem; }
    .svc-row h2 { overflow-wrap: anywhere; }
    .post-wrap h1 { font-size: clamp(1.35rem, 4.5vw, 2.2rem); overflow-wrap: anywhere; }
}
@media (max-width: 900px) {
    .contact-grid { grid-template-columns: 1fr; gap: 2.5rem; }
}
@media (max-width: 700px) {
    .container { width: calc(100% - 2.5rem); }
    .blog-grid,
    .contact-grid { grid-template-columns: 1fr; }
    .contact-grid { gap: 2rem; }
    .page-hero { padding: var(--space-hero-top) 0 var(--space-section-y); }
    .page-section { padding: var(--space-section-y) 0; }
    .page-section.is-tight,
    .page-hero + .page-section,
    .page-section + .page-section,
    .page-section + .cta-band { padding-top: 0; }
    .cta-band { padding: var(--space-cta-y) 0; }
    .submit-btn { width: 100%; justify-content: center; }
    .input-group input,
    .input-group textarea,
    .input-group select { font-size: 16px; }
    .svc-row { gap: 0.85rem 1rem; padding: 1.35rem 0; }
    .page-desc { font-size: 1rem; }
}
@media (max-width: 420px) {
    .container { width: calc(100% - 2rem); }
    .breadcrumb { letter-spacing: 0.14em; }
}
