:root {
    color-scheme: light;
    --coral-text: #a83a26;
    --peach: #ffe4d7;
    --sky: #2da8f3;
    --sky-text: #08639f;
    --sky-soft: #e8f5ff;
    --section-blue: #486ab6;
    --line-blue: #dbe4ff;
    --ink: #182d4b;
    --muted: #4d6075;
    --paper: #fff7ec;
    --surface: #fffdfa;
    --line: #e9ddd0;
    --header-height: 72px;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-padding-top: calc(var(--header-height) + 16px); }
body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font: 400 1rem/1.65 Manrope, "Noto Sans Thai", system-ui, sans-serif;
}
a { color: inherit; }
img { display: block; max-width: 100%; }
button { font: inherit; }
h1, h2, h3, p, figure { margin: 0; }
h1, h2, h3 { font-weight: 800; line-height: 1.25; }
h2 { font-size: clamp(1.95rem, 4.3vw, 3.5rem); }
a:focus-visible, button:focus-visible, summary:focus-visible {
    outline: 3px solid var(--sky-text);
    outline-offset: 4px;
}

.shell { width: min(100% - 2 * clamp(1.125rem, 4.8vw, 4.5rem), 77rem); margin-inline: auto; }
.skip-link {
    position: fixed;
    z-index: 20;
    top: 8px;
    left: 8px;
    padding: 8px 14px;
    background: white;
    transform: translateY(-160%);
}
.skip-link:focus { transform: translateY(0); }
.site-header {
    position: sticky;
    z-index: 10;
    top: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
}
@supports (backdrop-filter: blur(16px)) {
    .site-header { background: rgb(255 253 250 / 94%); backdrop-filter: blur(16px); }
}
.header-inner, .footer-inner {
    position: relative;
    display: flex;
    min-height: var(--header-height);
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.brand {
    display: block;
    width: clamp(10.25rem, 18vw, 12.75rem);
    flex: none;
    border-radius: 12px;
}
.brand img { width: 100%; height: auto; }
.brand-dot { color: var(--coral-text); }
.site-nav { display: flex; align-items: center; gap: clamp(0.15rem, 1vw, 1.1rem); }
.site-nav a {
    display: flex;
    min-height: 44px;
    align-items: center;
    padding: 6px 10px;
    border-radius: 14px;
    font-size: .88rem;
    font-weight: 700;
    text-decoration: none;
}
.site-nav a:hover { background: var(--sky-soft); color: var(--sky-text); }
.site-nav .nav-contact { gap: 8px; color: var(--sky-text); background: var(--sky-soft); }
.site-nav .nav-contact:hover { background: #d7edfd; }
.menu-toggle {
    display: none;
    width: 46px;
    height: 46px;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--sky-soft);
    color: var(--ink);
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
}

.hero {
    padding-block: clamp(2.75rem, 6vw, 5.75rem);
    text-align: center;
}
.hero h1 {
    max-width: 58rem;
    margin-inline: auto;
    font-size: clamp(2.6rem, 5.15vw, 5rem);
    line-height: 1.12;
    letter-spacing: -.06em;
    text-wrap: balance;
}
.hero h1 span {
    display: block;
    margin-top: .12em;
    color: var(--sky-text);
    font-size: .82em;
    letter-spacing: -.055em;
}
.hero > p { max-width: 44ch; margin: 1.4rem auto 0; color: var(--muted); font-size: clamp(1.02rem, 1.5vw, 1.2rem); }
.actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 11px; margin-top: 1.65rem; }
.button {
    display: inline-flex;
    min-height: 52px;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 11px 19px;
    border: 1px solid transparent;
    border-radius: 16px;
    font-weight: 800;
    text-decoration: none;
    transition: background-color .18s, border-color .18s;
}
.button-primary { background: #00843b; color: white; box-shadow: 0 4px 0 #bceacd; }
.button-primary:hover { background: #006e31; }
.button-outline { border-color: #b0ccdf; background: var(--surface); color: var(--sky-text); }
.button-outline:hover { border-color: var(--sky-text); background: var(--sky-soft); }

.section-inner { padding-block: clamp(2.75rem, 5.4vw, 5rem); }
.work { border-block: 1px solid var(--line); background: var(--surface); }
.section-heading { display: grid; gap: .4rem; margin-bottom: clamp(1.15rem, 2.5vw, 1.65rem); }
.section-heading p { max-width: 50ch; color: var(--muted); }
.project-grid, .archive-grid, .service-grid, .development-grid { display: grid; gap: 16px; }
.project-grid { grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); }
.project-card, .archive-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: white;
    text-decoration: none;
}
.project-card:hover, .archive-card:hover { border-color: var(--sky-text); }
.project-art {
    display: grid;
    width: 100%;
    min-height: 155px;
    max-height: 14rem;
    aspect-ratio: 1.8;
    place-items: center;
    padding: clamp(14px, 2.6vw, 32px);
}
.project-art-makrub { background: #e4f5ff; }
.project-art-kubkaraoke { background: var(--peach); }
.project-art-iperiodic { background: #fff2d2; }
.project-art img {
    width: auto;
    height: clamp(82px, 10vw, 136px);
    border-radius: 20%;
    object-fit: contain;
    box-shadow: 0 12px 24px rgb(24 45 75 / 16%);
}
.project-art-iperiodic img { width: auto; height: auto; max-height: 128px; border-radius: 8px; }
.project-copy { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 17px; }
.project-copy h3 { font-size: 1.22rem; }
.project-copy p { margin-top: 5px; color: var(--muted); font-size: .93rem; }
.project-copy > span, .archive-card span:last-child { color: var(--sky-text); font-size: 1.08rem; }
.project-archive { margin-top: 23px; border-top: 1px solid var(--line); }
.project-archive summary { width: fit-content; min-height: 44px; padding-block: 11px; font-weight: 800; cursor: pointer; }
.archive-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-block: 10px 20px; }
.archive-card { display: grid; grid-template-columns: 1fr auto; border-radius: 14px; }
.archive-card img { grid-column: span 2; width: 100%; height: auto; }
.archive-card span { padding: 9px 12px; font-weight: 700; }

.about { background: linear-gradient(120deg, #ffe5d9, #fff0de); }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(1.2rem, 5vw, 4.5rem); }
.about .split, .contact-panel { align-items: center; }
.about p, .contact-panel > div p { max-width: 46ch; margin-bottom: 15px; font-size: clamp(1.03rem, 1.7vw, 1.23rem); }
.text-link { display: inline-flex; align-items: center; gap: 7px; font-weight: 800; text-underline-offset: .3em; }
.service-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.service-grid article {
    padding: 21px;
    border: 1px solid var(--line);
    border-top: 3px solid var(--sky);
    border-radius: 18px;
    background: var(--surface);
}
.service-grid h3 { font-size: 1.15rem; }
.service-grid p { margin-top: 8px; color: var(--muted); line-height: 1.6; }
.app-development { background: white; color: var(--section-blue); }
.app-development .split { grid-template-columns: .8fr 1.2fr; align-items: start; }
.app-development p { margin-top: 12px; }
.development-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 0; padding: 0; list-style: none; }
.development-grid li { display: grid; align-content: start; gap: 4px; padding: 4px 0 13px; border-bottom: 1px solid var(--line-blue); }
.development-grid .development-platform {
    padding: clamp(.8rem, 1.6vw, 1.15rem);
    border: 1px solid var(--line-blue);
    border-radius: 16px;
    background: var(--sky-soft);
    color: #36579a;
}
.contact-panel {
    padding: clamp(1.3rem, 4vw, 4rem);
    border: 1px solid var(--line-blue);
    border-radius: 30px;
    background: white;
    color: var(--section-blue);
}
.contact-panel h2 { margin-bottom: 10px; }
.contact-panel address {
    padding-inline-start: clamp(1rem, 2.5vw, 2rem);
    border-inline-start: 1px solid var(--line-blue);
    font-style: normal;
}
.contact-links { display: flex; flex-wrap: wrap; gap: 8px 17px; margin-top: 10px; font-weight: 800; }
.contact-links a { text-underline-offset: .25em; }
.policy { background: #f7eee2; }
.policy .section-inner { max-width: 56rem; }
.policy-language { display: flex; gap: 9px; margin-top: 18px; }
.policy-language button {
    min-height: 44px;
    padding: 6px 16px;
    border: 1px solid #b0ccdf;
    border-radius: 12px;
    background: var(--surface);
    color: var(--ink);
    cursor: pointer;
}
.policy-language [aria-pressed="true"] { border-color: var(--sky-text); background: var(--sky-soft); color: var(--sky-text); font-weight: 800; }
.policy-copy {
    padding: clamp(1rem, 3vw, 2rem);
    margin-top: 16px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: var(--surface);
    overflow-wrap: anywhere;
}
.policy-copy h3 { margin: 1.35em 0 .45em; font-size: 1.18rem; }
.policy-copy h4, .policy-copy p, .policy-copy ul { margin-block: .6em; }
.policy-copy ul { padding-inline-start: 1.35rem; }
.site-footer { border-top: 1px solid var(--line); background: var(--surface); }

@media (max-width: 960px) {
    .site-nav { gap: 0; }
    .site-nav a { padding-inline: 7px; }
    .service-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
    :root { --header-height: 64px; }
    .header-inner { flex-wrap: wrap; }
    .menu-toggle:not([hidden]) { display: grid; margin-left: auto; }
    .site-nav { flex: 0 0 100%; flex-wrap: wrap; padding: 0 0 9px; }
    .site-nav[data-collapsible] {
        position: absolute;
        inset: calc(100% + 1px) 0 auto;
        display: none;
        max-height: calc(100dvh - var(--header-height) - 20px);
        overflow: auto;
        padding: 7px;
        border: 1px solid var(--line);
        border-radius: 18px;
        background: var(--surface);
        box-shadow: 0 14px 32px rgb(24 45 75 / 13%);
    }
    .site-nav[data-open] { display: grid; }
    .site-nav a { padding-inline: 11px; font-size: 1rem; }
    .split, .app-development .split { grid-template-columns: 1fr; }
    .hero h1 { font-size: clamp(2.22rem, 8vw, 3.5rem); }
    .hero > p { margin-top: .95rem; }
    .actions { gap: 8px; margin-top: 1.1rem; }
    .actions .button { gap: 8px; padding-inline: 13px; font-size: .94rem; }
    .service-grid { gap: 12px; }
    .service-grid article { padding: 15px; }
    .contact-panel address {
        padding: 1rem 0 0;
        border: 0;
        border-top: 1px solid var(--line-blue);
    }
    .archive-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
    .archive-card span { padding: 7px 8px; }
}

@media (max-width: 680px) {
    .project-grid { grid-template-columns: 1fr; }
    .project-art { max-height: none; aspect-ratio: 2.25; }
}

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

@media (max-width: 365px) {
    .development-grid { grid-template-columns: 1fr; }
    .actions .button { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition: none !important; }
}
