:root {
    --bg: #0b1020;
    --surface: rgba(255, 255, 255, .06);
    --surface-2: rgba(255, 255, 255, .10);
    --border: rgba(255, 255, 255, .14);
    --text: rgba(255, 255, 255, .92);
    --muted: rgba(255, 255, 255, .70);
    --muted-2: rgba(255, 255, 255, .55);

    --accent-1: #4F46E5;
    /* indigo */
    --accent-2: #22D3EE;
    /* cyan */
    --accent-3: #A855F7;
    /* violet */

    --grad: linear-gradient(135deg, var(--accent-2), var(--accent-1), var(--accent-3));
    --grad-soft: linear-gradient(135deg, rgba(34, 211, 238, .22), rgba(79, 70, 229, .18), rgba(168, 85, 247, .18));

    --shadow: 0 14px 40px rgba(0, 0, 0, .35);
    --radius: 18px;
    --radius-lg: 26px;

    /* Retain some existing vars for compatibility if needed, or remap */
    --header-height: 70px;
}

* {
    box-sizing: border-box;
}

html,
body {
    height: 100%;
}

body {
    margin: 0;
    color: var(--text);
    background: radial-gradient(1200px 600px at 10% 10%, rgba(34, 211, 238, .18), transparent 60%),
        radial-gradient(900px 500px at 90% 20%, rgba(168, 85, 247, .18), transparent 60%),
        radial-gradient(1000px 700px at 40% 90%, rgba(79, 70, 229, .16), transparent 60%),
        var(--bg);
    background-attachment: fixed;
    /* Fix background for scrolling */
    font-family: ui-sans-serif, system-ui, -apple-system, "Hiragino Sans", "Noto Sans JP", "Yu Gothic", "Meiryo", sans-serif;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

/* subtle grid */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background-image:
        linear-gradient(to right, rgba(255, 255, 255, .05) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(255, 255, 255, .05) 1px, transparent 1px);
    background-size: 64px 64px;
    opacity: .22;
    mask-image: radial-gradient(circle at 50% 20%, rgba(0, 0, 0, 1), rgba(0, 0, 0, .2) 55%, rgba(0, 0, 0, 0) 80%);
    z-index: -1;
}

/* noise */
body::after {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23n)' opacity='.25'/%3E%3C/svg%3E");
    opacity: .10;
    mix-blend-mode: overlay;
    z-index: -1;
}

img {
    max-width: 100%;
    height: auto;
    vertical-align: bottom;
}

/* container */
.container {
    width: min(1120px, 92vw);
    margin-inline: auto;
    padding-inline: 18px;
}

@media (max-width: 640px) {
    .container {
        padding-inline: 14px;
    }
}

/* header (glass) */
.header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(11, 16, 32, .55);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(255, 255, 255, .10);
    height: var(--header-height);
    display: flex;
    align-items: center;
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.logo {
    font-weight: 800;
    letter-spacing: .02em;
}

.logo a {
    text-decoration: none;
    color: var(--text);
}

.logo .logo-text {
    display: inline-block;
    font-size: 2rem;
    line-height: 1.2;
    padding-bottom: 8px;
}

@supports (-webkit-background-clip: text) {
    .logo .logo-text {
        background: var(--grad);
        -webkit-background-clip: text;
        background-clip: text;
        color: transparent;
        text-shadow: 0 0 18px rgba(34, 211, 238, .10);
    }
}

.logo a:hover .logo-text {
    filter: brightness(1.06);
}

.nav-desktop {
    display: none;
}

@media (min-width: 768px) {
    .nav-desktop {
        display: flex;
        align-items: center;
        gap: 30px;
    }
}

.nav-link {
    color: var(--muted);
    text-decoration: none;
    font-weight: 500;
}

.nav-link:hover {
    color: var(--text);
}

/* Mobile Menu Toggle (Adapted from previous) */
.menu-toggle {
    display: block;
    width: 30px;
    height: 24px;
    position: relative;
    cursor: pointer;
    z-index: 1100;
}

@media (min-width: 768px) {
    .menu-toggle {
        display: none;
    }
}

.menu-toggle span {
    display: block;
    width: 100%;
    height: 2px;
    background: var(--text);
    position: absolute;
    left: 0;
    transition: all 0.3s ease;
}

.menu-toggle span:nth-child(1) {
    top: 0;
}

.menu-toggle span:nth-child(2) {
    top: 11px;
}

.menu-toggle span:nth-child(3) {
    bottom: 0;
}

.menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg);
    top: 11px;
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg);
    bottom: 11px;
}

/* Mobile Nav Overlay */
.nav-mobile {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    height: 100vh;
    background: rgba(11, 16, 32, .95);
    /* Dark background */
    backdrop-filter: blur(20px);
    padding-top: var(--header-height);
    transition: right 0.4s ease;
    z-index: 1050;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 40px;
}

.nav-mobile.active {
    right: 0;
}

.nav-mobile a {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text);
    text-decoration: none;
}

/* buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    padding: 12px 18px;
    border-radius: 999px;
    text-decoration: none;
    font-weight: 700;
    border: 1px solid transparent;
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease, background .18s ease, color .18s ease;
    font-size: 1rem;
    cursor: pointer;
}

.btn-sm {
    padding: 8px 18px;
    font-size: 0.9rem;
}

.btn-primary {
    background: var(--grad);
    color: #06101a;
    box-shadow: 0 10px 28px rgba(79, 70, 229, .28);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 16px 44px rgba(34, 211, 238, .18), 0 16px 44px rgba(168, 85, 247, .14);
}

.btn-outline {
    background: rgba(255, 255, 255, .04);
    color: var(--text);
    border-color: rgba(255, 255, 255, .20);
}

.btn-outline:hover {
    border-color: rgba(255, 255, 255, .34);
    transform: translateY(-1px);
    background: rgba(255, 255, 255, .08);
}

/* Utility for text center */
.text-center {
    text-align: center;
}

.text-subtle {
    color: var(--muted-2);
    font-size: 0.9em;
}

/* hero */
.hero {
    /* Applied to first section */
    padding: 86px 0 56px;
}

.hero h1 {
    font-size: clamp(34px, 4.2vw, 56px);
    line-height: 1.18;
    letter-spacing: -.02em;
    margin: 0 0 18px;
    color: var(--text);
}

.grad {
    background: var(--grad);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero p {
    color: var(--muted);
    margin: 0 0 28px;
}

.hero .actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
}

/* section title */
.section {
    padding: 80px 0;
}

h2 {
    font-size: clamp(22px, 2.4vw, 34px);
    margin: 0 0 30px;
    color: var(--text);
}

h3 {
    font-size: 1.5rem;
    margin-bottom: 1em;
    color: var(--text);
}

p {
    margin-bottom: 20px;
    color: var(--muted);
}

/* cards */
.grid-3 {
    display: grid;
    gap: 18px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid-2 {
    display: grid;
    gap: 18px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: center;
}

.card {
    position: relative;
    background: linear-gradient(180deg, rgba(255, 255, 255, .08), rgba(255, 255, 255, .04));
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: var(--radius-lg);
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .22);
    overflow: hidden;
    transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
    height: 100%;
}

.card::before {
    content: "";
    position: absolute;
    inset: -2px;
    background: var(--grad-soft);
    opacity: .0;
    transition: opacity .18s ease;
    z-index: 0;
}

.card>* {
    position: relative;
    z-index: 1;
}

.card:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, .26);
    box-shadow: 0 18px 46px rgba(0, 0, 0, .32);
}

.card:hover::before {
    opacity: .22;
}

.card h3 {
    margin: 0 0 15px;
    font-size: 1.25rem;
    font-weight: 700;
}

.card p {
    margin: 0;
    color: var(--muted);
}

.card a {
    color: var(--accent-2);
    font-weight: 700;
    margin-top: 15px;
    display: inline-block;
}

/* footer */
.footer {
    margin-top: 76px;
    border-top: 1px solid rgba(255, 255, 255, .10);
    background: rgba(11, 16, 32, .35);
    padding: 60px 0 30px;
}

.footer-grid {
    display: grid;
    gap: 40px;
    margin-bottom: 40px;
}

@media (min-width: 768px) {
    .footer-grid {
        grid-template-columns: 1fr 2fr;
    }

    .footer-nav {
        display: flex;
        justify-content: flex-end;
        gap: 30px;
    }
}

.footer-nav a {
    color: var(--muted-2);
    text-decoration: none;
}

.footer-nav a:hover {
    color: var(--text);
}

.footer-copy {
    text-align: center;
    color: var(--muted-2);
    font-size: 0.85rem;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, .05);
}

/* Step list */
.step-list {
    counter-reset: step;
}

.step-item {
    position: relative;
    padding-left: 60px;
    margin-bottom: 40px;
}

.step-item::before {
    counter-increment: step;
    content: "0" counter(step);
    position: absolute;
    left: 0;
    top: 0;
    font-size: 2rem;
    font-weight: 900;
    background: var(--grad);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    opacity: 0.8;
}

/* Form placeholder */
.form-placeholder {
    background: rgba(255, 255, 255, 0.03);
    border: 2px dashed rgba(255, 255, 255, 0.2);
    padding: 40px;
    text-align: center;
    border-radius: var(--radius);
    color: var(--muted);
}

/* Responsive */
@media (max-width: 900px) {
    .grid-3 {
        grid-template-columns: 1fr;
    }

    .grid-2 {
        grid-template-columns: 1fr;
    }

    .hero {
        padding: 68px 0 44px;
    }
}

body.no-scroll {
    overflow: hidden;
}

/* Service Media */
.service-media {
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, .14);
    background: rgba(255, 255, 255, .04);
    width: 100%;
    height: 100%;
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.service-media img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.service-media:hover img {
    transform: scale(1.05);
}

/* Contact Embed Iframe */
.contact-embed .iframe-wrap,
.iframe-wrap {
    width: 100% !important;
    max-width: 100% !important;
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, .14);
    background: rgba(255, 255, 255, .04);
}

.contact-embed iframe,
.iframe-wrap iframe,
#xserverMailForm {
    display: block;
    width: 100% !important;
    border: 0;
    /* Adapts to screen height while ensuring sufficient minimum height */
    height: clamp(980px, 120vh, 1400px);
    background: transparent;
}

@media (max-width: 640px) {

    .contact-embed iframe,
    .iframe-wrap iframe,
    #xserverMailForm {
        height: clamp(1200px, 160vh, 1800px);
    }
}

/* Profile Card */
.profile-card {
    display: grid;
    gap: 18px;
    align-items: center;
    grid-template-columns: 120px 1fr;
    padding: 18px;
    margin-bottom: 20px;
}

.profile-avatar {
    width: 120px;
    height: 120px;
    border-radius: 999px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, .18);
    background: rgba(255, 255, 255, .04);
}

.profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 20% 25%;
    display: block;
}

@media (max-width: 640px) {
    .profile-card {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .profile-avatar {
        margin: 0 auto;
    }
}

/* --- Gallery Styles --- */
.workshop-gallery {
    margin-top: 25px;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.workshop-gallery .h3 {
    margin: 6px 0 14px;
    font-size: 18px;
    color: rgba(255, 255, 255, .92);
}

.workshop-gallery .kicker {
    font-size: 12px;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, .55);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.gallery-item {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, .14);
    background: rgba(255, 255, 255, .04);
    box-shadow: 0 10px 30px rgba(0, 0, 0, .22);
    transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.gallery-item:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, .26);
    box-shadow: 0 18px 46px rgba(0, 0, 0, .32);
}

.gallery-item img {
    width: 100%;
    height: 170px;
    display: block;
    object-fit: cover;
    object-position: center;
}

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

    .gallery-item img {
        height: 220px;
    }
}