/* =================================================================
   JML — Full-Stack Web Studio
   Clean / minimalist. Palette sampled from jmlminimalist.png.
   ================================================================= */

:root {
    /* Brand palette */
    --bg:        #ffffff;
    --bg-soft:   #f5fafc;   /* faint sky tint for alternating sections */
    --bg-tint:   #eaf6fb;
    --sky:       #a9deef;   /* signature light blue */
    --sky-200:   #cfeef7;
    --sky-600:   #57b4d6;   /* deeper sky for hover/lines */
    --steel:     #6e9bc5;   /* secondary blue (from logo lockup) */
    --navy:      #2e4a73;   /* deep brand blue */
    --ink:       #1d222a;   /* headings / near-black */
    --grey:      #59616c;   /* body text */
    --grey-400:  #9aa3ae;   /* muted */
    --line:      #e7edf2;   /* hairlines */

    /* Type */
    --serif: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
    --sans:  'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

    /* Rhythm */
    --container: 1180px;
    --gutter: clamp(20px, 5vw, 56px);
    --radius: 18px;
    --radius-sm: 12px;
    --shadow: 0 18px 50px -28px rgba(46, 74, 115, .35);
    --shadow-soft: 0 10px 30px -20px rgba(46, 74, 115, .35);
    --ease: cubic-bezier(.22, .61, .36, 1);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
    font-family: var(--sans);
    color: var(--grey);
    background: var(--bg);
    line-height: 1.65;
    font-size: 17px;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--steel); text-decoration: none; transition: color .2s var(--ease); }
a:hover { color: var(--navy); }
ul { list-style: none; padding: 0; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }

::selection { background: var(--sky); color: var(--navy); }

/* ---------- 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; left: 16px; top: -60px; z-index: 200;
    background: var(--navy); color: #fff; padding: 10px 18px; border-radius: 0 0 10px 10px;
    transition: top .2s var(--ease);
}
.skip-link:focus { top: 0; color: #fff; }
:focus-visible { outline: 2px solid var(--steel); outline-offset: 3px; border-radius: 4px; }

/* ---------- Layout ---------- */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: clamp(64px, 9vw, 128px); }
.section--soft { background: var(--bg-soft); }
.section--tight { padding-block: clamp(48px, 6vw, 80px); }

/* ---------- Typography ---------- */
h1, h2, h3, h4 { color: var(--ink); font-weight: 600; line-height: 1.12; letter-spacing: -.01em; }
.display {
    font-family: var(--serif);
    font-weight: 500;
    font-size: clamp(2.7rem, 6.4vw, 5.2rem);
    line-height: 1.04;
    letter-spacing: -.015em;
    color: var(--ink);
}
.display em { font-style: italic; color: var(--steel); font-weight: 500; }
.h2 { font-family: var(--serif); font-weight: 500; font-size: clamp(2rem, 4vw, 3.1rem); letter-spacing: -.01em; }
.h2 em { font-style: italic; color: var(--steel); }
.lede { font-size: clamp(1.05rem, 1.6vw, 1.3rem); color: var(--grey); max-width: 54ch; }

.eyebrow {
    display: inline-flex; align-items: center; gap: 10px;
    font-size: .8rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase;
    color: var(--steel);
}
.eyebrow::before { content: ""; width: 26px; height: 1px; background: var(--sky-600); display: inline-block; }

.section__head { max-width: 62ch; margin-bottom: clamp(36px, 5vw, 60px); }
.section__head .h2 { margin-top: 14px; }
.section__head p { margin-top: 16px; }
.center { text-align: center; margin-inline: auto; }
.center .eyebrow::before { display: none; }
.center .eyebrow { gap: 0; }

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex; align-items: center; gap: 10px;
    padding: 14px 26px; border-radius: 100px; font-weight: 600; font-size: .98rem;
    transition: transform .25s var(--ease), box-shadow .25s var(--ease), background .25s var(--ease), color .25s var(--ease);
    white-space: nowrap;
}
.btn .icon { width: 18px; height: 18px; transition: transform .25s var(--ease); }
.btn--primary { background: var(--navy); color: #fff; box-shadow: var(--shadow-soft); }
.btn--primary:hover { background: #25406a; color: #fff; transform: translateY(-2px); box-shadow: var(--shadow); }
.btn--primary:hover .icon { transform: translateX(4px); }
.btn--ghost { background: transparent; color: var(--navy); box-shadow: inset 0 0 0 1.5px var(--line); }
.btn--ghost:hover { color: var(--navy); box-shadow: inset 0 0 0 1.5px var(--sky-600); transform: translateY(-2px); }
.btn--sky { background: var(--sky); color: var(--navy); }
.btn--sky:hover { background: var(--sky-200); color: var(--navy); transform: translateY(-2px); }
.btn--lg { padding: 16px 32px; font-size: 1.02rem; }

/* ---------- Brand mark ---------- */
.brand { display: inline-flex; align-items: center; }
.brand__logo { max-height: 60px; height: auto; width: auto; display: block; }
.brand__logo--footer { max-height: 44px; }
@media (max-width: 760px) { .brand__logo { max-height: 44px; } }
.brand__mark {
    position: relative; font-family: var(--serif); font-style: italic; font-weight: 500;
    font-size: 1.9rem; color: var(--navy); line-height: 1; padding-left: 2px;
}
.brand__star { font-style: normal; font-size: .7em; color: var(--sky-600); margin-right: 1px; vertical-align: super; }
.brand__mark--footer { color: #fff; font-size: 2.2rem; }
.brand__mark--footer .brand__star { color: var(--sky); }

/* ---------- Header ---------- */
.site-header {
    position: sticky; top: 0; z-index: 100;
    background: rgba(255,255,255,.78);
    backdrop-filter: saturate(180%) blur(14px);
    -webkit-backdrop-filter: saturate(180%) blur(14px);
    border-bottom: 1px solid transparent;
    transition: border-color .3s var(--ease), background .3s var(--ease);
}
.site-header.is-scrolled { border-bottom-color: var(--line); }
.header__inner { display: flex; align-items: center; justify-content: space-between; min-height: 76px; }
.nav { display: flex; align-items: center; }
.nav__menu { display: flex; align-items: center; gap: 4px; }
.nav__menu a {
    color: var(--grey); font-weight: 500; font-size: .97rem;
    padding: 8px 16px; border-radius: 100px; transition: color .2s var(--ease), background .2s var(--ease);
}
.nav__menu a:hover { color: var(--navy); background: var(--bg-tint); }
.nav__menu a.is-active { color: var(--navy); }
.nav__cta { background: var(--navy); color: #fff !important; margin-left: 8px; }
.nav__cta:hover { background: #25406a; }
.nav__toggle { display: none; flex-direction: column; gap: 5px; padding: 10px; }
.nav__toggle span:not(.sr-only) { width: 24px; height: 2px; background: var(--navy); border-radius: 2px; transition: transform .3s var(--ease), opacity .2s var(--ease); }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; padding-block: clamp(70px, 11vw, 150px) clamp(60px, 9vw, 120px); }
.hero__bg {
    position: absolute; inset: 0; z-index: -1;
    background:
        radial-gradient(60% 70% at 88% 6%, var(--bg-tint) 0%, transparent 60%),
        radial-gradient(50% 60% at 0% 100%, #f0f9fd 0%, transparent 55%);
}
.hero__grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(40px, 6vw, 80px); align-items: center; }
.hero .display { margin-top: 22px; }
.hero .lede { margin-top: 26px; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 36px; }
.hero__meta { display: flex; gap: 36px; margin-top: 48px; flex-wrap: wrap; }
.hero__meta .stat__num { font-family: var(--serif); font-size: 2.4rem; color: var(--navy); line-height: 1; }
.hero__meta .stat__label { font-size: .85rem; color: var(--grey-400); margin-top: 6px; }

/* Hero visual card */
.hero__visual { position: relative; }
.hero__card {
    position: relative; background: #fff; border-radius: var(--radius);
    box-shadow: var(--shadow); border: 1px solid var(--line); overflow: hidden;
}
.hero__card-bar { display: flex; gap: 7px; padding: 16px 18px; border-bottom: 1px solid var(--line); background: var(--bg-soft); }
.hero__card-bar span { width: 11px; height: 11px; border-radius: 50%; background: var(--sky-200); }
.hero__card-bar span:first-child { background: var(--sky); }
.hero__code { padding: 22px 24px; font-family: 'SFMono-Regular', ui-monospace, 'Cascadia Code', Consolas, monospace; font-size: .82rem; line-height: 1.9; color: var(--grey); }
.hero__code .c-key { color: var(--steel); }
.hero__code .c-str { color: #4a9d7a; }
.hero__code .c-com { color: var(--grey-400); }
.hero__code .c-fn  { color: var(--navy); font-weight: 600; }
.hero__chip {
    position: absolute; bottom: -18px; left: -18px; background: var(--sky); color: var(--navy);
    font-weight: 600; font-size: .8rem; padding: 12px 18px; border-radius: 14px; box-shadow: var(--shadow-soft);
    display: flex; align-items: center; gap: 8px;
}
.hero__chip .icon { width: 18px; height: 18px; }

/* ---------- Marquee / trust strip ---------- */
.strip { border-block: 1px solid var(--line); }
.strip__inner { display: flex; align-items: center; gap: clamp(28px, 6vw, 70px); flex-wrap: wrap; justify-content: center; padding-block: 28px; }
.strip span { font-family: var(--serif); font-style: italic; font-size: clamp(1.2rem, 2vw, 1.6rem); color: var(--grey-400); }

/* ---------- Service cards ---------- */
.grid { display: grid; gap: 22px; }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }

.card {
    position: relative; background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
    padding: 34px 30px; transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s var(--ease);
    height: 100%;
}
.card:hover { transform: translateY(-5px); box-shadow: var(--shadow); border-color: var(--sky-200); }
.card__icon {
    width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center;
    background: var(--bg-tint); color: var(--navy); margin-bottom: 22px;
}
.card__icon .icon { width: 24px; height: 24px; }
.card h3 { font-size: 1.3rem; }
.card__tag { color: var(--steel); font-size: .9rem; font-weight: 500; margin-top: 4px; }
.card p { margin-top: 14px; font-size: .98rem; }
.card__num { position: absolute; top: 26px; right: 30px; font-family: var(--serif); font-size: 1.1rem; color: var(--grey-400); }

/* ---------- Work / portfolio ---------- */
.work-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 26px; }
.project {
    border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: #fff;
    transition: transform .3s var(--ease), box-shadow .3s var(--ease);
    display: flex; flex-direction: column;
}
.project:hover { transform: translateY(-5px); box-shadow: var(--shadow); }
.project__thumb {
    aspect-ratio: 16 / 10; position: relative; display: grid; place-items: center; overflow: hidden;
}
.project__thumb::after {
    content: ""; position: absolute; inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,.16), rgba(255,255,255,0) 55%);
}
.project__glyph { font-family: var(--serif); font-style: italic; font-size: clamp(2.6rem, 6vw, 4rem); color: rgba(255,255,255,.92); position: relative; z-index: 1; }
.project__thumb--img { padding: 0; }
.project__thumb--img img {
    width: 100%; height: 100%; object-fit: cover; object-position: top center;
    transition: transform .5s var(--ease);
}
.project:hover .project__thumb--img img { transform: scale(1.04); }
a.project__thumb { cursor: pointer; }
.project__body { padding: 26px 28px; flex: 1; display: flex; flex-direction: column; }
.project__meta { display: flex; justify-content: space-between; align-items: center; font-size: .82rem; color: var(--grey-400); font-weight: 500; }
.project__meta .cat { color: var(--steel); }
.project h3 { font-size: 1.35rem; margin-top: 10px; }
.project p { margin-top: 10px; font-size: .96rem; }
.project__link { margin-top: 18px; display: inline-flex; align-items: center; gap: 8px; font-weight: 600; color: var(--navy); }
.project__link .icon { width: 17px; height: 17px; transition: transform .25s var(--ease); }
.project:hover .project__link .icon { transform: translateX(4px); }

/* ---------- Process / steps ---------- */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; counter-reset: step; }
.step { padding-top: 26px; border-top: 2px solid var(--line); position: relative; transition: border-color .3s var(--ease); }
.step:hover { border-color: var(--sky-600); }
.step__n { font-family: var(--serif); font-style: italic; font-size: 1.4rem; color: var(--sky-600); }
.step h3 { font-size: 1.2rem; margin-top: 10px; }
.step p { margin-top: 10px; font-size: .95rem; }

/* ---------- Split / about ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(40px, 6vw, 80px); align-items: center; }
.stack > * + * { margin-top: 18px; }
.values { display: grid; gap: 16px; margin-top: 8px; }
.value { display: flex; gap: 16px; align-items: flex-start; }
.value__check { flex: none; width: 26px; height: 26px; border-radius: 50%; background: var(--sky); color: var(--navy); display: grid; place-items: center; margin-top: 2px; }
.value__check .icon { width: 15px; height: 15px; }
.value h4 { font-size: 1.05rem; }
.value p { font-size: .95rem; margin-top: 2px; }

.stat-band { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.stat-band .stat { text-align: center; }
.stat-band .stat__num { font-family: var(--serif); font-size: clamp(2.4rem, 5vw, 3.4rem); color: var(--navy); line-height: 1; }
.stat-band .stat__label { font-size: .88rem; color: var(--grey-400); margin-top: 8px; }

/* ---------- CTA band ---------- */
.cta {
    background: linear-gradient(135deg, var(--navy), #1c3357);
    color: #fff; border-radius: var(--radius); padding: clamp(44px, 7vw, 84px); text-align: center;
    position: relative; overflow: hidden;
}
.cta::before {
    content: ""; position: absolute; width: 380px; height: 380px; border-radius: 50%;
    background: radial-gradient(circle, rgba(169,222,239,.5), transparent 65%);
    top: -160px; right: -120px;
}
.cta__inner { position: relative; z-index: 1; }
.cta .h2 { color: #fff; }
.cta .h2 em { color: var(--sky); }
.cta p { color: rgba(255,255,255,.82); margin-top: 16px; max-width: 50ch; margin-inline: auto; }
.cta .hero__actions { justify-content: center; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: clamp(36px, 6vw, 72px); align-items: start; }
.contact-info { display: grid; gap: 26px; }
.contact-item { display: flex; gap: 16px; align-items: flex-start; }
.contact-item__icon { flex: none; width: 44px; height: 44px; border-radius: 12px; background: var(--bg-tint); color: var(--navy); display: grid; place-items: center; }
.contact-item__icon .icon { width: 20px; height: 20px; }
.contact-item h4 { font-size: .8rem; text-transform: uppercase; letter-spacing: .12em; color: var(--grey-400); font-weight: 600; }
.contact-item p, .contact-item a { font-size: 1.05rem; color: var(--ink); margin-top: 4px; }
.contact-item a:hover { color: var(--steel); }

.form-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(28px, 4vw, 44px); box-shadow: var(--shadow-soft); }
.field { margin-bottom: 20px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
label { display: block; font-size: .85rem; font-weight: 600; color: var(--ink); margin-bottom: 8px; }
label .opt { color: var(--grey-400); font-weight: 400; }
input, textarea {
    width: 100%; font: inherit; font-size: .98rem; color: var(--ink);
    padding: 13px 16px; border: 1.5px solid var(--line); border-radius: var(--radius-sm);
    background: var(--bg-soft); transition: border-color .2s var(--ease), background .2s var(--ease), box-shadow .2s var(--ease);
}
input:focus, textarea:focus { outline: none; border-color: var(--sky-600); background: #fff; box-shadow: 0 0 0 4px rgba(169,222,239,.4); }
textarea { resize: vertical; min-height: 130px; }
.hp { position: absolute; left: -9999px; opacity: 0; height: 0; width: 0; }
.form-note { font-size: .85rem; color: var(--grey-400); margin-top: 4px; }
.form-status { margin-top: 16px; padding: 14px 18px; border-radius: var(--radius-sm); font-size: .95rem; font-weight: 500; display: none; }
.form-status.is-ok { display: block; background: #e8f7ef; color: #1f7a4d; }
.form-status.is-err { display: block; background: #fdecec; color: #b23b3b; }
.field-error { border-color: #d98a8a !important; }

/* ---------- Page hero (interior pages) ---------- */
.page-hero { padding-block: clamp(60px, 8vw, 110px) clamp(36px, 5vw, 60px); background:
    radial-gradient(50% 80% at 90% 0%, var(--bg-tint), transparent 60%); }
.page-hero .display { font-size: clamp(2.4rem, 5.2vw, 4rem); margin-top: 18px; }
.page-hero p { margin-top: 20px; }

/* ---------- Footer ---------- */
.site-footer { background: #131b29; color: rgba(255,255,255,.7); padding-block: clamp(54px, 7vw, 88px) 30px; margin-top: 0; }
.footer__inner { display: grid; grid-template-columns: 1.4fr 1fr; gap: 48px; padding-bottom: 44px; border-bottom: 1px solid rgba(255,255,255,.1); }
.footer__tag { font-family: var(--serif); font-style: italic; font-size: 1.25rem; color: var(--sky); margin-top: 12px; }
.footer__nav { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
.footer__nav h4 { color: #fff; font-size: .8rem; text-transform: uppercase; letter-spacing: .12em; margin-bottom: 14px; }
.footer__nav a { display: block; color: rgba(255,255,255,.65); padding: 5px 0; font-size: .95rem; }
.footer__nav a:hover { color: var(--sky); }
.footer__bar { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-top: 26px; font-size: .85rem; color: rgba(255,255,255,.45); }

/* ---------- Scroll reveal ---------- */
[data-reveal] { opacity: 0; transform: translateY(22px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
[data-reveal].is-visible { opacity: 1; transform: none; }
[data-reveal][data-delay="1"] { transition-delay: .08s; }
[data-reveal][data-delay="2"] { transition-delay: .16s; }
[data-reveal][data-delay="3"] { transition-delay: .24s; }
[data-reveal][data-delay="4"] { transition-delay: .32s; }
[data-reveal][data-delay="5"] { transition-delay: .40s; }

@media (prefers-reduced-motion: reduce) {
    * { animation: none !important; transition: none !important; scroll-behavior: auto; }
    [data-reveal] { opacity: 1; transform: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
    .hero__grid { grid-template-columns: 1fr; }
    .hero__visual { order: -1; max-width: 460px; }
    .grid--3, .steps, .stat-band { grid-template-columns: repeat(2, 1fr); }
    .split, .contact-grid { grid-template-columns: 1fr; }
    .work-grid { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
    .nav__toggle { display: flex; }
    .nav__menu {
        position: fixed; inset: 76px 0 auto 0; flex-direction: column; align-items: stretch; gap: 0;
        background: #fff; border-bottom: 1px solid var(--line); padding: 12px var(--gutter) 24px;
        transform: translateY(-12px); opacity: 0; pointer-events: none; transition: transform .3s var(--ease), opacity .3s var(--ease);
        box-shadow: var(--shadow-soft);
    }
    .nav__menu.is-open { transform: none; opacity: 1; pointer-events: auto; }
    .nav__menu a { padding: 14px 8px; border-radius: 10px; }
    .nav__cta { margin-left: 0; margin-top: 8px; text-align: center; }
    .nav__toggle.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
    .nav__toggle.is-open span:nth-child(2) { opacity: 0; }
    .nav__toggle.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
    .footer__inner { grid-template-columns: 1fr; gap: 32px; }
    .field-row { grid-template-columns: 1fr; }
}
@media (max-width: 460px) {
    .grid--3, .grid--2, .steps, .stat-band { grid-template-columns: 1fr; }
    .hero__meta { gap: 24px; }
}
