/* Valoris Forge — Forge Patina
   System: Fraunces + Inter + JetBrains Mono */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,400;0,9..144,500;0,9..144,600;0,9..144,700;1,9..144,400;1,9..144,500;1,9..144,600&family=Inter:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500;600&display=swap');
@import 'variables.css';

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

html, body {
    background: var(--paper);
    color: var(--ink);
    font-family: var(--sans);
    font-size: 17px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

html { scroll-behavior: smooth; }

body {
    background-image:
        radial-gradient(ellipse at 50% 0%, rgba(200, 133, 43, 0.04), transparent 60%),
        radial-gradient(rgba(26, 24, 21, 0.018) 1px, transparent 1px);
    background-size: 100% 800px, 4px 4px;
    background-position: 0 0, 0 0;
    background-repeat: no-repeat, repeat;
}

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

a {
    color: inherit;
    text-decoration: none;
    position: relative;
}

a:focus-visible {
    outline: 2px solid var(--ember);
    outline-offset: 3px;
    border-radius: 2px;
}

button { font-family: inherit; cursor: pointer; }

ul, ol { list-style: none; }

::selection {
    background: var(--ember);
    color: var(--paper);
}

/* ===== Accessibility ===== */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.skip-link {
    position: absolute;
    top: 0;
    left: 0;
    padding: 14px 22px;
    background: var(--ember);
    color: var(--paper);
    font-family: var(--mono);
    font-size: 12px;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    font-weight: 500;
    z-index: 9999;
    transform: translateY(-100%);
    transition: transform var(--transition-fast);
}

.skip-link:focus {
    transform: translateY(0);
}

/* ===== Containers ===== */
.container {
    max-width: var(--max);
    margin: 0 auto;
    padding: 0 var(--gutter);
}

.section {
    padding: var(--section-y) 0;
    position: relative;
}

.section + .section {
    border-top: 1px solid var(--rule);
}

/* ===== Type ===== */
.h-display {
    font-family: var(--serif);
    font-weight: 500;
    letter-spacing: -0.025em;
    line-height: 0.96;
}

.h-section {
    font-family: var(--serif);
    font-weight: 500;
    font-size: clamp(32px, 4vw, 52px);
    line-height: 1.05;
    letter-spacing: -0.02em;
}

.italic { font-style: italic; }

.lead {
    font-family: var(--serif);
    font-size: 22px;
    line-height: 1.5;
    font-weight: 400;
    color: var(--ink-2);
    max-width: 56ch;
}

.body {
    font-family: var(--sans);
    font-size: 17px;
    line-height: 1.65;
    color: var(--ink-2);
    max-width: 62ch;
}

.small {
    font-family: var(--sans);
    font-size: 14px;
    color: var(--ink-3);
}

.eyebrow,
.label {
    font-family: var(--mono);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--ink-soft);
}

.ember { color: var(--ember); }

/* ===== Logo system ===== */
.wordmark {
    font-family: var(--serif);
    font-weight: 500;
    letter-spacing: -0.012em;
    line-height: 1;
    display: inline-flex;
    align-items: baseline;
    gap: 0.18em;
    color: var(--ink);
}
.wordmark .forge {
    font-style: italic;
}

.monogram {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 1.25px solid var(--ink);
    border-radius: 50%;
    position: relative;
    flex: 0 0 auto;
}
.monogram::before {
    content: '';
    position: absolute;
    inset: 3px;
    border: 0.5px solid var(--ink);
    border-radius: 50%;
    opacity: 0.5;
}
.monogram .vf {
    font-family: var(--serif);
    font-weight: 600;
    font-size: 17px;
    letter-spacing: -0.06em;
    line-height: 1;
    margin-top: 1px;
}
.monogram .vf .f {
    color: var(--ember);
    font-style: italic;
}

.monogram-inverted {
    border-color: var(--paper);
}
.monogram-inverted::before { border-color: var(--paper); }
.monogram-inverted .vf { color: var(--paper); }
.monogram-inverted .vf .f { color: var(--ember); }

/* ===== Buttons ===== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 24px;
    font-family: var(--sans);
    font-size: 15px;
    font-weight: 500;
    border: 1.25px solid var(--ink);
    background: transparent;
    color: var(--ink);
    border-radius: 999px;
    transition: all 0.18s ease;
    letter-spacing: -0.005em;
    white-space: nowrap;
    text-decoration: none;
    cursor: pointer;
}
.btn:hover {
    background: var(--ink);
    color: var(--paper);
    transform: translateY(-1px);
}
.btn .arrow {
    transition: transform 0.2s ease;
}
.btn:hover .arrow { transform: translate(2px, -2px); }

.btn-primary {
    background: var(--ink);
    color: var(--paper);
}
.btn-primary:hover {
    background: var(--ember-deep);
    border-color: var(--ember-deep);
    color: var(--paper);
}

.btn-ember {
    background: var(--ember);
    color: var(--paper);
    border-color: var(--ember);
}
.btn-ember:hover {
    background: var(--ember-deep);
    border-color: var(--ember-deep);
}

.text-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 500;
    border-bottom: 1px solid var(--rule-strong);
    padding-bottom: 2px;
    transition: all 0.2s ease;
}
.text-link:hover {
    border-bottom-color: var(--ember);
    color: var(--ember-deep);
}

/* ===== Header / Nav ===== */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(244, 239, 230, 0.85);
    backdrop-filter: blur(16px) saturate(140%);
    -webkit-backdrop-filter: blur(16px) saturate(140%);
    border-bottom: 1px solid var(--rule);
}

.nav {
    display: flex;
    align-items: center;
    padding: 18px 0;
    gap: 32px;
}
.nav-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}
.nav-brand .wordmark {
    font-size: 21px;
}
.nav-links {
    margin-left: auto;
    display: flex;
    gap: 32px;
    align-items: center;
    font-size: 14px;
}
.nav-links a {
    color: var(--ink-2);
    font-weight: 400;
    transition: color 0.15s ease;
}
.nav-links a:hover { color: var(--ember-deep); }

.nav-cta {
    margin-left: 24px;
}

/* ===== Hero ===== */
.hero {
    padding: 96px 0 120px;
    position: relative;
    overflow: hidden;
}

.hero-eyebrow {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 44px;
}
.hero-eyebrow .dot {
    width: 6px;
    height: 6px;
    background: var(--ember);
    border-radius: 50%;
}

.hero-title {
    font-family: var(--serif);
    font-weight: 500;
    font-size: clamp(56px, 8.4vw, 116px);
    line-height: 0.92;
    letter-spacing: -0.035em;
    margin: 0;
    color: var(--ink);
}
.hero-title .l2 {
    display: block;
}
.hero-title .technology {
    font-style: italic;
    color: var(--ember);
    position: relative;
}

.hero-sub {
    margin-top: 40px;
    max-width: 520px;
    font-family: var(--serif);
    font-size: 21px;
    line-height: 1.5;
    color: var(--ink-2);
    font-weight: 400;
}

.hero-actions {
    margin-top: 44px;
    display: flex;
    gap: 14px;
    align-items: center;
    flex-wrap: wrap;
}

.hero-meta {
    margin-top: 96px;
    padding-top: 24px;
    border-top: 1px solid var(--rule);
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 32px;
}
.hero-meta .cell .label { display: block; margin-bottom: 6px; }
.hero-meta .cell .val {
    font-family: var(--serif);
    font-size: 17px;
    font-weight: 500;
    color: var(--ink);
}

/* ===== Services ===== */
.services-head {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: end;
    margin-bottom: 64px;
}
.services-head .right {
    text-align: left;
    max-width: 380px;
    justify-self: end;
}

.service {
    display: grid;
    grid-template-columns: 80px 1fr 220px 32px;
    gap: 32px;
    padding: 36px 0;
    border-top: 1px solid var(--rule);
    align-items: baseline;
    cursor: default;
    transition: padding 0.25s ease;
}
.service:last-child { border-bottom: 1px solid var(--rule); }

.service:hover {
    padding-left: 12px;
}
.service:hover .service-arrow {
    transform: translate(4px, -4px);
    color: var(--ember);
}

.service-num {
    font-family: var(--serif);
    font-size: 28px;
    font-weight: 500;
    font-style: italic;
    color: var(--ember);
}
.service-title {
    font-family: var(--serif);
    font-size: clamp(22px, 2.6vw, 30px);
    font-weight: 500;
    line-height: 1.25;
    letter-spacing: -0.015em;
    color: var(--ink);
}
.service-cat {
    font-family: var(--mono);
    font-size: 11px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--ink-soft);
    align-self: center;
}
.service-arrow {
    font-family: var(--serif);
    font-size: 22px;
    color: var(--ink-soft);
    transition: all 0.25s ease;
}

/* ===== Process ===== */
.process {
    background: var(--paper-2);
    border-top: 1px solid var(--rule);
    border-bottom: 1px solid var(--rule);
}
.process-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
    margin-top: 64px;
    position: relative;
}
.process-grid::before {
    content: '';
    position: absolute;
    top: 22px;
    left: 12.5%;
    right: 12.5%;
    height: 1px;
    border-top: 1px dashed var(--rule-strong);
    z-index: 0;
}

.step {
    position: relative;
    z-index: 1;
    padding: 0 28px 0 0;
}
.step-mark {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--paper-2);
    border: 1.25px solid var(--ink);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--serif);
    font-weight: 500;
    font-style: italic;
    font-size: 17px;
    color: var(--ember);
    margin-bottom: 24px;
}
.step-title {
    font-family: var(--serif);
    font-size: 32px;
    font-weight: 500;
    letter-spacing: -0.02em;
    margin-bottom: 6px;
}
.step-dur {
    font-family: var(--mono);
    font-size: 11px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--ember);
    margin-bottom: 16px;
    display: block;
}
.step-desc {
    font-size: 15px;
    line-height: 1.55;
    color: var(--ink-2);
    max-width: 240px;
}

/* ===== Founder ===== */
.founder {
    display: grid;
    grid-template-columns: 1fr 1.25fr;
    gap: 80px;
    align-items: center;
}
.founder-portrait {
    aspect-ratio: 4/5;
    background: var(--paper-2);
    border: 1px solid var(--rule-strong);
    position: relative;
    overflow: hidden;
}
.founder-portrait img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.founder-portrait .frame-corners {
    position: absolute;
    inset: 8px;
    border: 1px dashed var(--paper);
    pointer-events: none;
    mix-blend-mode: difference;
    opacity: 0.7;
}
.founder-portrait .photo-tag {
    font-family: var(--mono);
    font-size: 10px;
    letter-spacing: 0.18em;
    color: var(--paper);
    text-transform: uppercase;
    position: absolute;
    bottom: 24px;
    left: 24px;
    z-index: 1;
    background: rgba(26, 24, 21, 0.55);
    padding: 6px 10px;
    border-radius: 2px;
    backdrop-filter: blur(4px);
}

.founder-name {
    font-family: var(--serif);
    font-size: clamp(48px, 6.5vw, 84px);
    font-weight: 500;
    line-height: 0.95;
    letter-spacing: -0.03em;
    margin-bottom: 32px;
}
.founder-name .last {
    font-style: italic;
    color: var(--ember);
}

.founder-quote {
    font-family: var(--serif);
    font-size: 24px;
    font-style: italic;
    line-height: 1.4;
    color: var(--ink-2);
    border-left: 2px solid var(--ember);
    padding-left: 20px;
    margin: 32px 0;
    max-width: 480px;
}
.founder-meta {
    margin-top: 32px;
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}

/* ===== Engagement ===== */
.engagement-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
    margin-top: 56px;
}
.eng-cell {
    padding: 8px 32px;
    border-left: 1px solid var(--rule-strong);
}
.eng-cell:first-child { padding-left: 0; border-left: none; }
.eng-cell .label { display: block; margin-bottom: 12px; }
.eng-cell .val {
    font-family: var(--serif);
    font-size: 32px;
    font-weight: 500;
    font-style: italic;
    line-height: 1.15;
    letter-spacing: -0.015em;
}
.eng-cell .val .ember { font-style: normal; }

/* ===== Contact ===== */
.contact {
    background: var(--ink);
    color: var(--paper);
    border-top: none !important;
}
.contact .label { color: var(--ink-faint); }

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 96px;
    align-items: start;
}
.contact h2 {
    color: var(--paper);
    font-size: clamp(48px, 6vw, 84px);
}
.contact h2 .ember { color: var(--ember); font-style: italic; }
.contact .lead { color: rgba(244, 239, 230, 0.78); }

.contact-direct {
    margin-top: 40px;
    padding: 24px 28px;
    border: 1px solid rgba(244, 239, 230, 0.18);
    border-radius: 4px;
    background: rgba(244, 239, 230, 0.04);
    display: flex;
    align-items: center;
    gap: 18px;
}
.contact-direct .label {
    color: var(--ember);
    display: block;
    margin-bottom: 4px;
}
.contact-direct .email {
    font-family: var(--serif);
    font-size: 22px;
    font-style: italic;
    color: var(--paper);
}

.form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}
.field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.field label {
    font-family: var(--mono);
    font-size: 11px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--ink-faint);
}
.field input,
.field textarea {
    background: transparent;
    border: none;
    border-bottom: 1px solid rgba(244, 239, 230, 0.25);
    color: var(--paper);
    font-family: var(--sans);
    font-size: 16px;
    padding: 10px 0;
    outline: none;
    font-weight: 400;
    resize: none;
    width: 100%;
    transition: border-color 0.2s ease;
}
.field input:focus,
.field textarea:focus {
    border-bottom-color: var(--ember);
}
.field textarea { min-height: 110px; }

.form .btn-ember {
    align-self: flex-start;
    margin-top: 12px;
}

/* ===== Footer ===== */
.footer {
    background: var(--paper-2);
    padding: 80px 0 40px;
}
.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 48px;
    padding-bottom: 56px;
    border-bottom: 1px solid var(--rule);
}
.footer-brand .wordmark { font-size: 26px; }
.footer-brand .tagline {
    font-family: var(--serif);
    font-style: italic;
    font-size: 16px;
    color: var(--ink-3);
    margin-top: 10px;
}
.footer-col h4 {
    font-family: var(--mono);
    font-size: 11px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--ink-soft);
    margin-bottom: 16px;
    font-weight: 500;
}
.footer-col li {
    font-size: 15px;
    color: var(--ink-2);
    margin-bottom: 8px;
}
.footer-col a { transition: color 0.15s; }
.footer-col a:hover { color: var(--ember-deep); }

.footer-bottom {
    margin-top: 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.footer-bottom .label { font-size: 10px; }
.footer-bottom .heated-bar {
    width: 120px;
    height: 3px;
    background: linear-gradient(90deg, var(--ink) 0%, var(--ink) 30%, var(--ember-deep) 60%, var(--ember) 85%, var(--ember-light) 100%);
}

/* ===== Reveal animation ===== */
.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}
.reveal.in {
    opacity: 1;
    transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    .reveal { opacity: 1; transform: none; }
}

/* ===== Section headers ===== */
.section-head {
    display: flex;
    align-items: baseline;
    gap: 24px;
    margin-bottom: 56px;
    flex-wrap: wrap;
}
.section-head .label { flex-shrink: 0; }

/* ===== Mobile menu drawer ===== */
.mobile-menu {
    position: fixed;
    inset: 0;
    background: var(--paper);
    z-index: 100;
    transform: translateY(-100%);
    transition: transform 0.4s cubic-bezier(0.65, 0, 0.35, 1);
    display: flex;
    flex-direction: column;
    pointer-events: none;
}
.mobile-menu.open {
    transform: translateY(0);
    pointer-events: auto;
}
.mm-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 22px;
    border-bottom: 1px solid var(--rule);
}
.mm-close {
    background: transparent;
    border: 1.25px solid var(--ink);
    border-radius: 999px;
    padding: 8px 14px;
    font-family: var(--mono);
    font-size: 11px;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--ink);
}
.mm-links {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 32px 22px;
    gap: 4px;
}
.mm-links a {
    display: flex;
    align-items: baseline;
    gap: 18px;
    font-family: var(--serif);
    font-size: 32px;
    font-weight: 500;
    letter-spacing: -0.02em;
    padding: 12px 0;
    border-bottom: 1px solid var(--rule);
    color: var(--ink);
}
.mm-links a:last-child { border-bottom: none; }
.mm-num {
    font-family: var(--mono);
    font-size: 11px;
    letter-spacing: 0.18em;
    color: var(--ember);
    font-weight: 500;
    flex-shrink: 0;
    width: 28px;
}
.mm-footer {
    padding: 22px;
    border-top: 1px solid var(--rule);
}
.menu-btn {
    display: none;
    background: transparent;
    border: 1.25px solid var(--ink);
    border-radius: 999px;
    padding: 8px 14px;
    font-family: var(--mono);
    font-size: 11px;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--ink);
    margin-left: auto;
}

/* ===== Tablet (≤980px) ===== */
@media (max-width: 980px) {
    :root { --gutter: 28px; --section-y: 80px; }
    .hero { padding: 64px 0 80px; }
    .nav-links { display: none; }
    .nav-cta { display: none; }
    .menu-btn { display: inline-flex; }
    .nav-brand .wordmark { font-size: 18px; }
    .hero-meta { grid-template-columns: repeat(2, 1fr); gap: 24px; margin-top: 64px; }
    .services-head,
    .founder,
    .contact-grid,
    .footer-grid { grid-template-columns: 1fr; gap: 32px; }
    .services-head .right { justify-self: start; }
    .service { grid-template-columns: 56px 1fr; gap: 20px; padding: 28px 0; }
    .service-cat { grid-column: 2; padding-top: 4px; }
    .service-arrow { display: none; }
    .service:hover { padding-left: 0; }
    .process-grid { grid-template-columns: repeat(2, 1fr); gap: 48px 32px; }
    .process-grid::before { display: none; }
    .engagement-grid { grid-template-columns: 1fr; gap: 0; }
    .eng-cell { padding: 20px 0; border-left: none; border-top: 1px solid var(--rule-strong); }
    .eng-cell:first-child { border-top: none; padding-top: 0; }
    .footer-grid { padding-bottom: 40px; }
    .contact-grid { gap: 56px; }
}

/* ===== Phone (≤640px) ===== */
@media (max-width: 640px) {
    :root { --gutter: 22px; --section-y: 64px; }
    body { font-size: 16px; }

    .hero { padding: 48px 0 64px; }
    .hero-eyebrow { margin-bottom: 28px; }
    .hero-eyebrow .label { font-size: 10px; letter-spacing: 0.15em; }
    .hero-title { font-size: clamp(48px, 13vw, 68px); line-height: 0.95; letter-spacing: -0.03em; }
    .hero-sub { font-size: 18px; margin-top: 28px; }
    .hero-actions { margin-top: 32px; flex-direction: column; align-items: stretch; gap: 10px; }
    .hero-actions .btn { justify-content: space-between; padding: 16px 22px; font-size: 15px; min-height: 52px; }
    .hero-meta { grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 56px; }
    .hero-meta .cell .val { font-size: 15px; }

    .nav { padding: 14px 0; gap: 12px; }
    .monogram { width: 32px; height: 32px; }
    .monogram .vf { font-size: 15px; }
    .nav-brand { gap: 10px; }
    .nav-brand .wordmark { font-size: 17px; }

    .h-section { font-size: clamp(30px, 8vw, 40px); }
    .section-head { gap: 12px; margin-bottom: 36px; }

    .process-grid { grid-template-columns: 1fr; gap: 36px; margin-top: 40px; }
    .step { padding: 0; }
    .step-mark { width: 36px; height: 36px; font-size: 14px; margin-bottom: 18px; }
    .step-title { font-size: 26px; }
    .step-desc { max-width: 100%; }

    .service { grid-template-columns: 44px 1fr; gap: 14px; padding: 24px 0; }
    .service-num { font-size: 22px; }
    .service-title { font-size: 20px; line-height: 1.3; }
    .service-cat { font-size: 10px; letter-spacing: 0.15em; }

    .founder { gap: 32px; }
    .founder-name { font-size: clamp(44px, 12vw, 60px); margin-bottom: 24px; }
    .founder-quote { font-size: 19px; padding-left: 16px; margin: 24px 0; }
    .founder-meta .btn { width: 100%; justify-content: space-between; }

    .eng-cell .val { font-size: 26px; }

    .contact { padding-top: 72px; padding-bottom: 72px; }
    .contact h2 { font-size: clamp(40px, 11vw, 56px); }
    .contact-direct { padding: 18px 20px; gap: 14px; }
    .contact-direct .email { font-size: 17px; word-break: break-all; }
    .contact-direct .monogram { width: 32px; height: 32px; flex: 0 0 32px; }
    .contact-direct .monogram .vf { font-size: 14px; }
    .form .btn-ember { width: 100%; justify-content: space-between; }

    .footer { padding: 56px 0 32px; }
    .footer-grid { gap: 32px; padding-bottom: 32px; }
    .footer-bottom { flex-direction: column; gap: 16px; align-items: flex-start; }
    .footer-bottom .heated-bar { width: 100%; }

    .btn { padding: 12px 20px; font-size: 14px; }
    .btn-ember { font-size: 14px; }
}

/* ===== Small phone (≤380px) ===== */
@media (max-width: 380px) {
    .hero-meta { grid-template-columns: 1fr; }
    .hero-title { font-size: 44px; }
}
