/* ==========================================================
   Fayakun Services — "Rising" identity
   Forest, paper and one warm signal. Round shapes that echo
   the mark: an outline (the plan) and a solid disc (the result).
   ========================================================== */

:root {
    --paper: #f6f4ec;
    --paper-2: #ede9dc;
    --card: #ffffff;
    --ink: #173d34;
    --text: #3f524c;
    --muted: #5f6f69;
    --line: rgba(23, 61, 52, 0.14);
    --line-strong: rgba(23, 61, 52, 0.3);
    --signal: #f2a65a;
    --signal-deep: #b5601a;
    --signal-wash: #fcecd8;

    --night: #173d34;
    --night-2: #1f4a40;
    --on-night: #f6f4ec;
    --on-night-2: #b9c8c1;
    --night-line: rgba(246, 244, 236, 0.16);

    --display: 'Outfit', 'Segoe UI', system-ui, sans-serif;
    --sans: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

    --r-lg: 28px;
    --r: 20px;
    --r-sm: 12px;
    --shadow: 0 1px 2px rgba(23, 61, 52, 0.05), 0 12px 32px -12px rgba(23, 61, 52, 0.16);

    --wrap: 1200px;
    --gutter: clamp(20px, 4vw, 48px);
    --header-h: 72px;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-padding-top: calc(var(--header-h) + 12px); -webkit-text-size-adjust: 100%; }

body {
    font-family: var(--sans);
    font-size: 17px;
    line-height: 1.6;
    color: var(--text);
    background: var(--paper);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
ul { list-style: none; }
img, svg { max-width: 100%; display: block; }
::selection { background: var(--signal); color: var(--ink); }
:focus-visible { outline: 3px solid var(--signal-deep); outline-offset: 3px; border-radius: 6px; }

.container { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }

h1, h2, h3 {
    font-family: var(--display);
    font-weight: 600;
    color: var(--ink);
    line-height: 1.08;
    letter-spacing: -0.025em;
    text-wrap: balance;
}
/* Emphasis is a marker stroke, not italics. */
h1 em, h2 em {
    font-style: normal;
    background: linear-gradient(transparent 64%, var(--signal) 64%, var(--signal) 92%, transparent 92%);
    padding: 0 0.06em;
    -webkit-box-decoration-break: clone; box-decoration-break: clone;
}

.label {
    font-family: var(--sans);
    font-size: 0.76rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.skip-link { position: absolute; left: 12px; top: -60px; z-index: 2000; background: var(--ink); color: var(--paper); padding: 10px 16px; border-radius: 999px; }
.skip-link:focus { top: 12px; }

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex; align-items: center; gap: 10px;
    font-family: var(--sans); font-size: 1rem; font-weight: 600;
    padding: 14px 26px; border: 0; border-radius: 999px;
    background: var(--ink); color: var(--paper);
    cursor: pointer; transition: background .2s, color .2s, transform .2s;
}
.btn .arrow { transition: transform .2s; }
.btn:hover { background: var(--signal); color: var(--ink); }
.btn:hover .arrow { transform: translateX(4px); }
.btn:active { transform: scale(0.98); }
.btn-sm { padding: 10px 20px; font-size: 0.92rem; }
.btn-signal { background: var(--signal); color: var(--ink); }
.btn-signal:hover { background: var(--paper); color: var(--ink); }

.text-link { color: var(--ink); font-weight: 600; border-bottom: 2px solid var(--signal); padding-bottom: 2px; transition: border-color .2s; }
.text-link:hover { border-color: var(--ink); }

/* ---------- Header ---------- */
.site-header {
    position: sticky; top: 0; z-index: 1000;
    background: rgba(246, 244, 236, 0.9);
    backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid transparent; transition: border-color .25s;
}
.site-header.scrolled { border-bottom-color: var(--line); }
.header-inner {
    max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); height: var(--header-h);
    display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.logo { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); }
.logo-mark { width: 36px; height: 36px; }
.logo-text { font-family: var(--display); font-size: 1.3rem; font-weight: 600; letter-spacing: -0.02em; }
.logo-text span { font-weight: 400; color: var(--muted); margin-left: 0.26em; }

.nav-menu { display: flex; align-items: center; gap: 32px; }
.nav-link { font-size: 0.96rem; font-weight: 500; color: var(--text); padding: 6px 0; border-bottom: 2px solid transparent; transition: color .2s, border-color .2s; }
.nav-link:hover, .nav-link.active { color: var(--ink); border-bottom-color: var(--signal); }

.nav-toggle { display: none; width: 44px; height: 44px; background: var(--card); border: 1px solid var(--line); border-radius: 50%; cursor: pointer; position: relative; }
.nav-toggle span { position: absolute; left: 13px; right: 13px; height: 2px; border-radius: 2px; background: var(--ink); transition: transform .25s, opacity .2s, top .25s; }
.nav-toggle span:nth-child(1) { top: 15px; }
.nav-toggle span:nth-child(2) { top: 21px; }
.nav-toggle span:nth-child(3) { top: 27px; }
.nav-toggle.active span:nth-child(1) { top: 21px; transform: rotate(45deg); }
.nav-toggle.active span:nth-child(2) { opacity: 0; }
.nav-toggle.active span:nth-child(3) { top: 21px; transform: rotate(-45deg); }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; padding: clamp(40px, 7vw, 88px) 0 clamp(48px, 6vw, 80px); }
/* The mark, very large and very quiet, behind the diagram. */
.hero::before, .hero::after { content: ''; position: absolute; z-index: -1; border-radius: 50%; pointer-events: none; }
.hero::before { width: min(46vw, 560px); aspect-ratio: 1; right: -6vw; top: -4%; background: var(--signal-wash); }
.hero::after { width: min(22vw, 260px); aspect-ratio: 1; right: -3vw; bottom: -8%; border: 2px solid var(--line-strong); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr); gap: clamp(32px, 5vw, 72px); align-items: center; }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 7px 16px 7px 12px; margin-bottom: 26px; }
.eyebrow::before { content: ''; width: 10px; height: 10px; border-radius: 50%; background: var(--signal); }
.hero h1 { font-size: clamp(2.6rem, 5.6vw, 4.6rem); margin-bottom: 26px; }
.hero-lede { font-size: clamp(1.08rem, 1.4vw, 1.25rem); max-width: 33em; margin-bottom: 36px; }
.hero-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 26px; }

.figure { background: var(--card); border-radius: var(--r-lg); box-shadow: var(--shadow); padding: 22px 22px 16px; }
.figure svg { width: 100%; height: auto; }
.figure figcaption { margin-top: 10px; padding-top: 14px; border-top: 1px solid var(--line); color: var(--muted); font-size: 0.86rem; line-height: 1.5; }
.figure figcaption b { color: var(--ink); font-weight: 600; }

.dg text { font-family: var(--sans); font-size: 10.5px; font-weight: 600; fill: var(--text); letter-spacing: 0.06em; }
.dg .t-strong { fill: var(--ink); }
.dg .t-accent { fill: var(--signal-deep); }
.dg .t-muted { fill: var(--muted); font-weight: 500; }
.dg .box { fill: var(--card); stroke: var(--ink); stroke-width: 1.4; }
.dg .box-accent { fill: var(--signal-wash); stroke: var(--signal-deep); stroke-width: 1.4; }
.dg .ghost { fill: none; stroke: var(--line-strong); stroke-width: 1.2; stroke-dasharray: 4 4; }
.dg .wire-accent { fill: none; stroke: var(--signal-deep); stroke-width: 1.8; stroke-dasharray: 5 5; animation: flow 1.6s linear infinite; }
.dg .wire-fade { fill: none; stroke: var(--line-strong); stroke-width: 1.4; stroke-dasharray: 2 5; }
@keyframes flow { to { stroke-dashoffset: -20; } }

/* ---------- Stats + sectors ---------- */
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); background: var(--card); border-radius: var(--r-lg); box-shadow: var(--shadow); padding: 8px 0; }
.stat { padding: 26px 30px; border-left: 1px solid var(--line); }
.stat:first-child { border-left: 0; }
.stat-number { display: block; font-family: var(--display); font-weight: 600; font-size: clamp(2rem, 3.4vw, 2.8rem); line-height: 1; letter-spacing: -0.03em; color: var(--ink); margin-bottom: 10px; }
.stat-label { color: var(--muted); display: block; font-size: 0.95rem; }

.sectors { padding: 36px 0 0; }
.sectors-inner { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; }
.sectors-label { color: var(--muted); }
.sectors-list { display: flex; flex-wrap: wrap; gap: 8px; }
.sectors-list li { background: var(--paper-2); color: var(--ink); font-weight: 500; font-size: 0.95rem; border-radius: 999px; padding: 7px 16px; }

/* ---------- Sections ---------- */
.section { padding: clamp(72px, 9vw, 120px) 0; }
.section-head { max-width: 760px; margin-bottom: clamp(36px, 5vw, 56px); }
.section-tag { display: inline-flex; align-items: center; gap: 10px; color: var(--muted); margin-bottom: 16px; }
.section-tag b { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--ink); color: var(--ink); font-size: 0.72rem; letter-spacing: 0; }
.section-title { font-size: clamp(2rem, 4vw, 3.1rem); }
.section-sub { margin-top: 18px; max-width: 36em; font-size: 1.1rem; }

.notice { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 20px; background: var(--signal-wash); border-radius: var(--r); padding: 18px 24px; margin-bottom: 24px; color: var(--ink); }
.notice .label { color: var(--signal-deep); }
.notice p { flex: 1 1 320px; }
.notice a { white-space: nowrap; }

/* ---------- Services ---------- */
.service-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.service { background: var(--card); border-radius: var(--r); box-shadow: var(--shadow); padding: 30px 28px 28px; display: flex; flex-direction: column; transition: transform .25s; }
.service:hover { transform: translateY(-4px); }
.service-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 22px; }
.service-num { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; border: 2.5px solid var(--ink); color: var(--ink); font-family: var(--display); font-weight: 600; font-size: 0.95rem; transition: background .25s, border-color .25s; }
.service:hover .service-num { background: var(--signal); border-color: var(--signal); }
.service-meta { color: var(--signal-deep); background: var(--signal-wash); border-radius: 999px; padding: 4px 12px; }
.service-title { font-size: 1.4rem; line-height: 1.2; margin-bottom: 12px; }
.service-desc { margin-bottom: 22px; font-size: 0.98rem; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; }
.tags li { font-size: 0.82rem; font-weight: 500; color: var(--ink); background: var(--paper); border-radius: 999px; padding: 4px 12px; }
.service-cta { background: var(--ink); color: var(--on-night-2); justify-content: space-between; box-shadow: none; }
.service-cta h3 { color: var(--on-night); font-size: 1.6rem; margin-bottom: 12px; }
.service-cta p { margin-bottom: 28px; }
.service-cta .btn { align-self: flex-start; }

/* ---------- Work (dark band) ---------- */
.work { background: var(--night); color: var(--on-night-2); border-radius: clamp(24px, 4vw, 44px); margin: 0 clamp(8px, 1.6vw, 20px); }
.work h2, .work h3 { color: var(--on-night); }
.work h2 em { background: none; color: var(--signal); padding: 0; }
.work .section-tag { color: var(--on-night-2); }
.work .section-tag b { border-color: var(--signal); color: var(--signal); }
.case-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.case { background: var(--night-2); border-radius: var(--r); padding: 30px 28px 14px; display: flex; flex-direction: column; }
.case-tag { color: var(--on-night-2); margin-bottom: 26px; }
.case-shift { font-family: var(--display); font-weight: 600; font-size: clamp(1.9rem, 2.9vw, 2.6rem); letter-spacing: -0.03em; line-height: 1; color: var(--signal); white-space: nowrap; }
.case-shift .to { color: var(--on-night-2); font-weight: 400; margin: 0 0.3em; }
.case-shift-label { margin: 10px 0 26px; display: block; }
.case-title { font-size: 1.2rem; line-height: 1.3; letter-spacing: -0.01em; margin-bottom: 10px; }
.case-desc { font-size: 0.98rem; margin-bottom: 24px; }
.case-metrics { margin-top: auto; }
.case-metrics li { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 12px 0; border-top: 1px solid var(--night-line); font-size: 0.94rem; }
.case-metrics span { font-family: var(--display); font-weight: 600; color: var(--on-night); font-size: 1.05rem; }
.work-note { margin-top: 28px; font-size: 0.92rem; }

/* ---------- Approach: three outlines, then the solid disc ---------- */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(20px, 3vw, 36px); position: relative; }
.steps::before { content: ''; position: absolute; left: 18px; right: 18px; top: 17px; border-top: 2px dashed var(--line-strong); }
.step { position: relative; padding-top: 62px; }
.step::before { content: ''; position: absolute; top: 0; left: 0; width: 36px; height: 36px; border-radius: 50%; border: 5px solid var(--ink); background: var(--paper); }
.step:last-child::before { border-color: var(--signal); background: var(--signal); }
.step-num { color: var(--muted); display: block; margin-bottom: 8px; }
.step-title { font-size: 1.6rem; margin-bottom: 10px; }
.step-desc { font-size: 0.98rem; }

/* ---------- Contact ---------- */
.contact { background: var(--paper-2); border-radius: clamp(24px, 4vw, 44px) clamp(24px, 4vw, 44px) 0 0; }
.contact-grid { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(36px, 6vw, 80px); align-items: start; }
.contact h2 { font-size: clamp(2.1rem, 4.4vw, 3.4rem); margin-bottom: 20px; }
.contact-lede { max-width: 30em; margin-bottom: 36px; font-size: 1.1rem; }
.contact-facts > div { display: grid; grid-template-columns: 120px 1fr; gap: 16px; padding: 16px 0; border-top: 1px solid var(--line); }
.contact-facts dt { color: var(--muted); padding-top: 4px; }
.contact-facts dd { color: var(--ink); font-weight: 500; }
.contact-facts dd small { display: block; color: var(--muted); font-size: 0.9rem; font-weight: 400; }
.contact-facts a { border-bottom: 2px solid var(--signal); }
.contact-facts a:hover { border-color: var(--ink); }
.assurances { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.assurances li { color: var(--ink); background: var(--card); border-radius: 999px; padding: 8px 16px; display: flex; align-items: center; gap: 8px; }
.assurances li::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--signal); }

.contact-form { background: var(--card); border-radius: var(--r-lg); box-shadow: var(--shadow); padding: clamp(24px, 3.4vw, 44px); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form-group { margin-bottom: 20px; }
.form-group label { display: block; color: var(--ink); font-size: 0.92rem; font-weight: 600; margin-bottom: 8px; letter-spacing: 0; text-transform: none; }
.form-group input, .form-group select, .form-group textarea {
    width: 100%; font: inherit; font-size: 1rem; color: var(--ink);
    background: var(--paper); border: 1.5px solid transparent; border-radius: var(--r-sm);
    padding: 14px 16px; transition: border-color .2s, background .2s, box-shadow .2s;
}
.form-group select {
    appearance: none; -webkit-appearance: none; padding-right: 42px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' stroke='%23173d34' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 16px center;
}
.form-group textarea { resize: vertical; min-height: 130px; }
.form-group ::placeholder { color: #7d8a85; }
.form-group input:focus, .form-group select:focus, .form-group textarea:focus { outline: none; border-color: var(--ink); background-color: #fff; box-shadow: 0 0 0 4px var(--signal-wash); }
.form-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.form-foot p { font-size: 0.9rem; color: var(--muted); white-space: nowrap; }
.form-foot p a { text-decoration: underline; }
.hidden { display: none !important; }

/* ---------- Footer ---------- */
.footer { background: var(--night); color: var(--on-night-2); padding: clamp(56px, 7vw, 80px) 0 28px; font-size: 0.95rem; }
.footer .logo { color: var(--on-night); }
.footer .logo-text span { color: var(--on-night-2); }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1.2fr 0.8fr 1.2fr; gap: 40px; padding-bottom: 52px; }
.footer-desc { margin-top: 18px; max-width: 26em; }
.footer h4 { font-size: 0.76rem; letter-spacing: 0.1em; text-transform: uppercase; font-weight: 600; color: var(--signal); margin-bottom: 18px; }
.footer-links li { margin-bottom: 10px; }
.footer-links a { color: var(--on-night); transition: color .2s; }
.footer-links a:hover { color: var(--signal); }
.email-label { display: block; font-size: 0.82rem; color: var(--on-night-2); }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px; padding-top: 24px; border-top: 1px solid var(--night-line); font-size: 0.86rem; }
.footer-legal { display: flex; gap: 24px; }
.footer-legal a:hover { color: var(--on-night); }

/* ---------- Legal + thank-you pages ---------- */
.legal-hero { padding: clamp(48px, 7vw, 80px) var(--gutter) 28px; }
.legal-hero h1 { font-size: clamp(2.4rem, 5.4vw, 3.8rem); margin: 22px 0 14px; }
.legal-hero .updated { font-size: 0.86rem; font-weight: 600; color: var(--muted); }
.back-home { font-size: 0.92rem; font-weight: 600; color: var(--ink); border-bottom: 2px solid var(--signal); padding-bottom: 2px; }
.back-home:hover { border-color: var(--ink); }
.legal-body { padding-top: 12px; padding-bottom: clamp(64px, 9vw, 104px); }
.legal-body > * { max-width: 760px; }
.legal-section { margin-bottom: 20px; background: var(--card); border-radius: var(--r); padding: 28px 30px 20px; }
.legal-section h2 { font-size: 1.45rem; margin-bottom: 14px; }
.legal-section h3 { font-size: 1.05rem; letter-spacing: -0.01em; margin: 20px 0 8px; }
.legal-section p, .legal-section li { line-height: 1.75; margin-bottom: 10px; }
.legal-section ul { padding-left: 20px; list-style: disc; }
.legal-section ul li::marker { color: var(--signal-deep); }
.legal-note { background: var(--signal-wash); border-radius: var(--r-sm); padding: 16px 20px; color: var(--ink); font-size: 0.97rem; }
.contact-email { color: var(--ink); font-weight: 600; }
a.contact-email { border-bottom: 2px solid var(--signal); }

.thank-you { min-height: calc(100vh - var(--header-h)); display: grid; place-items: center; padding: 64px var(--gutter); }
.thank-you-content { max-width: 620px; }
.thank-you h1 { font-size: clamp(2.8rem, 7vw, 4.6rem); margin: 0 0 22px; }
.thank-you p { font-size: 1.15rem; margin-bottom: 36px; max-width: 30em; }

/* ---------- Reveal (only when JS is present) ---------- */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s cubic-bezier(.2,.7,.2,1), transform .7s cubic-bezier(.2,.7,.2,1); transition-delay: var(--d, 0ms); }
.js .reveal.in { opacity: 1; transform: none; }
.js .service.reveal.in:hover { transform: translateY(-4px); transition-delay: 0ms; transition-duration: .25s; }

@media (prefers-reduced-motion: reduce) {
    .js .reveal { opacity: 1; transform: none; transition: none; }
    .dg .wire-accent { animation: none; }
    .service:hover { transform: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1020px) {
    .hero-grid { grid-template-columns: 1fr; }
    .figure { max-width: 620px; }
    .hero::after { display: none; }
    .service-list { grid-template-columns: 1fr 1fr; }
    .case-grid { grid-template-columns: 1fr; }
    .steps { grid-template-columns: 1fr 1fr; row-gap: 44px; }
    .steps::before { display: none; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .contact-grid { grid-template-columns: 1fr; }
}

@media (max-width: 820px) {
    .nav-toggle { display: block; }
    .nav-menu {
        position: absolute; top: calc(var(--header-h) - 4px); left: 12px; right: 12px;
        flex-direction: column; align-items: stretch; gap: 0;
        background: var(--card); border-radius: var(--r); box-shadow: var(--shadow);
        padding: 8px 22px 22px;
        visibility: hidden; opacity: 0; transform: translateY(-8px);
        transition: opacity .2s, transform .2s, visibility .2s;
    }
    .nav-menu.active { visibility: visible; opacity: 1; transform: none; }
    .nav-menu li { border-bottom: 1px solid var(--line); }
    .nav-menu li:last-child { border: 0; padding-top: 18px; }
    .nav-link { display: block; padding: 16px 0; font-family: var(--display); font-size: 1.4rem; font-weight: 600; color: var(--ink); border: 0; }
    .nav-menu .btn { width: 100%; justify-content: center; padding: 14px; font-size: 1rem; }

    .stats-grid { grid-template-columns: 1fr 1fr; padding: 0; }
    .stat { padding: 22px 22px; }
    .stat:nth-child(odd) { border-left: 0; }
    .stat:nth-child(n+3) { border-top: 1px solid var(--line); }
    .service-list { grid-template-columns: 1fr; }
    .hero::before { width: 70vw; right: -24vw; top: 0; }
}

@media (max-width: 560px) {
    body { font-size: 16px; }
    .form-row { grid-template-columns: 1fr; gap: 0; }
    .steps { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; gap: 32px; }
    .contact-facts > div { grid-template-columns: 1fr; gap: 4px; }
    .case-shift { white-space: normal; }
    .hero-cta .btn { width: 100%; justify-content: center; }
    .logo-text { font-size: 1.15rem; }
}
