/* =========================
   Design tokens and reset
========================= */

:root {
    --primary: #0F172A;
    --accent: #2563EB;
    --text: #334155;
    --muted: #64748B;
    --background: #FFFFFF;
    --line: #E2E8F0;
}

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

:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 3px;
}

.skip-link {
    position: absolute;
    left: -9999px;
    top: auto;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.skip-link:focus {
    position: fixed;
    top: 1rem;
    left: 1rem;
    z-index: 9999;
    width: auto;
    height: auto;
    overflow: visible;
    padding: 0.75rem 1.25rem;
    background: var(--background);
    color: var(--primary);
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    text-decoration: none;
    white-space: nowrap;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: "Pretendard", Arial, sans-serif;
    background: var(--background);
    color: var(--primary);
}

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

.container {
    width: min(1120px, 92%);
    margin: 0 auto;
}

/* =========================
   Header and navigation
========================= */

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, .75);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border-bottom: 1px solid rgba(226, 232, 240, .7);
    z-index: 1000;
}

.header-inner {
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    font-size: 26px;
    font-weight: 800;
    letter-spacing: 3px;
}

.nav {
    display: flex;
    gap: 32px;
    font-size: 15px;
    color: var(--text);
}

.nav a {
    position: relative;
    transition: .3s;
}

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

.nav a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -8px;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: .3s;
}

.nav a:hover::after {
    width: 100%;
}

/* Language switcher */

.language-switcher {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 3px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: white;
}

.language-button {
    min-width: 37px;
    height: 29px;
    padding: 0 9px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--muted);
    font-family: inherit;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: color .25s ease, background .25s ease;
}

.language-button:hover {
    color: var(--accent);
}

.language-button.active {
    background: var(--accent);
    color: white;
}

/* =========================
   Shared elements
========================= */

.section-number {
    margin-bottom: 20px;
    color: var(--accent);
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 4px;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px 34px;
    border-radius: 999px;
    background: var(--accent);
    color: white;
    font-size: 16px;
    font-weight: 700;
    animation: fadeUp 1.6s ease;
    transition: transform .2s ease, box-shadow .2s ease;
}

.button:hover {
    transform: translateY(-3px) scale(1.03);
    box-shadow: 0 15px 35px rgba(37, 99, 235, .28);
}

.button span {
    display: inline-block;
    transition: transform .3s ease;
}

.button:hover span {
    transform: translateX(6px);
}

.button.secondary {
    background: white;
    color: var(--accent);
    border: 1px solid var(--accent);
}

.button.secondary:hover {
    background: #EFF6FF;
}

/* =========================
   Hero
========================= */

.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 72px;
    background: radial-gradient(circle at top right, rgba(37, 99, 235, .08), transparent 40%);
}

.hero-inner {
    display: grid;
    grid-template-columns: 1.1fr .9fr;
    align-items: center;
    gap: 80px;
}

.hero-content {
    text-align: left;
}

.hero h1 {
    margin-bottom: 28px;
    font-size: clamp(64px, 9vw, 118px);
    line-height: .95;
    letter-spacing: -.06em;
}

.eyebrow {
    margin-bottom: 20px;
    color: var(--accent);
    font-size: 14px;
    font-weight: 700;
    letter-spacing: .18em;
    text-transform: uppercase;
}

.hero-text {
    margin-bottom: 26px;
    color: var(--primary);
    font-size: clamp(24px, 3vw, 38px);
}

.hero-description {
    max-width: 620px;
    margin-bottom: 42px;
    color: var(--muted);
    font-size: 18px;
    line-height: 1.8;
}

.hero-stats {
    display: flex;
    gap: 30px;
    margin-top: 70px;
}

.stat {
    padding-right: 35px;
    border-right: 1px solid var(--line);
}

.stat:last-child {
    border-right: none;
}

.stat h3 {
    color: var(--accent);
    font-size: 42px;
    font-weight: 800;
}

.stat p {
    margin-top: 8px;
    color: var(--muted);
    letter-spacing: 1px;
}

/* Hero illustration */

.hero-visual {
    display: flex;
    align-items: center;
    justify-content: center;
    animation: float 7s ease-in-out infinite;
}

.hero-visual svg {
    width: min(420px, 100%);
}

.svg-orbit {
    fill: none;
    stroke: rgba(37, 99, 235, .18);
    stroke-width: 2;
}

.svg-orbit.light {
    stroke: rgba(15, 23, 42, .08);
}

.svg-orbit.rotate-circle {
    stroke-dasharray: 8 14;
}

.svg-route {
    fill: none;
    stroke: var(--accent);
    stroke-width: 4;
    stroke-linecap: round;
}

.svg-route.thin {
    stroke-width: 2;
    opacity: .5;
}

.svg-node {
    fill: white;
    stroke: var(--accent);
    stroke-width: 4;
}

.svg-node.main {
    fill: var(--accent);
    filter: drop-shadow(0 0 18px rgba(37, 99, 235, .55));
}

.svg-node:nth-of-type(5) { animation-delay: 0s; }
.svg-node:nth-of-type(6) { animation-delay: .5s; }
.svg-node:nth-of-type(7) { animation-delay: 1s; }
.svg-node:nth-of-type(8) { animation-delay: 1.5s; }
.svg-node:nth-of-type(9) { animation-delay: 2s; }

.svg-text {
    fill: var(--muted);
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 4px;
}

.pulse {
    transform-origin: center;
    transform-box: fill-box;
    animation: pulse 2.5s ease-in-out infinite;
}

.rotate-circle {
    transform-origin: center;
    transform-box: fill-box;
    animation: rotateOrbit 28s linear infinite;
}

/* =========================
   About
========================= */

.about {
    padding: 140px 0;
    background: #F8FAFC;
}

.about h2 {
    margin-bottom: 30px;
    font-size: 48px;
}

.about-text {
    max-width: 700px;
    color: var(--text);
    font-size: 20px;
    line-height: 1.8;
}

/* =========================
   Business cards
========================= */

.business {
    padding: 140px 0;
}

.cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-top: 50px;
}

.card {
    padding: 40px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: white;
    cursor: pointer;
    transition: transform .35s ease, box-shadow .35s ease, border-color .35s ease;
}

.card:hover {
    transform: translateY(-12px) scale(1.02);
    border-color: #A5C8FF;
    box-shadow: 0 25px 60px rgba(37, 99, 235, .15);
}

.card-icon {
    margin-bottom: 20px;
    font-size: 40px;
    transition: .35s;
}

.card:hover .card-icon {
    transform: scale(1.25);
}

.card h3 {
    margin-bottom: 20px;
    transition: .35s;
}

.card:hover h3 {
    color: var(--accent);
}

.card p {
    color: var(--text);
    line-height: 1.7;
}

.card-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 28px;
    color: var(--accent);
    font-size: 15px;
    font-weight: 700;
    transition: .3s;
}

.card-link span {
    transition: .3s;
}

.card:hover .card-link span {
    transform: translateX(6px);
}

/* =========================
   Partners
========================= */

.partners {
    overflow: hidden;
    padding: 120px 0;
    background: white;
}

.partners h2 {
    margin-bottom: 24px;
    font-size: 48px;
}

.partners-text {
    max-width: 640px;
    margin-bottom: 50px;
    color: var(--text);
    font-size: 20px;
    line-height: 1.8;
}

.partner-track {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
}

.partner-track span {
    padding: 18px 26px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #F8FAFC;
    color: var(--primary);
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 2px;
}

.partner-track span:hover {
    border-color: var(--accent);
    background: var(--accent);
    color: white;
}

/* =========================
   Why HANAON
========================= */

.why {
    padding: 140px 0;
    background: #F8FAFC;
}

.why h2 {
    margin-bottom: 25px;
    font-size: 48px;
}

.why-text {
    max-width: 700px;
    margin-bottom: 60px;
    color: var(--text);
    font-size: 20px;
    line-height: 1.8;
}

.why-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 28px;
}

.why-card {
    padding: 38px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: white;
    transition: .35s;
}

.why-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, .08);
}

.why-icon {
    margin-bottom: 24px;
    font-size: 34px;
}

.why-card h3 {
    margin-bottom: 16px;
}

.why-card p {
    color: var(--text);
    line-height: 1.7;
}

/* =========================
   Products
========================= */

.products {
    padding: 100px 0;
    background: #f8fafc;
}

.products h2 {
    margin-bottom: 18px;
    font-size: 48px;
}

.products-notice {
    max-width: 720px;
    margin-bottom: 42px;
    color: var(--muted);
    font-size: 16px;
    line-height: 1.7;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
}

.product-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 15px 40px rgba(0, 0, 0, .08);
    transition: .35s;
}

.product-card:hover {
    transform: translateY(-10px);
    border-color: rgba(37, 99, 235, .22);
    box-shadow: 0 24px 50px rgba(15, 23, 42, .09), 0 10px 25px rgba(37, 99, 235, .06);
}

.product-card img {
    width: 100%;
    height: 230px;
    object-fit: cover;
    transition: .35s;
}

.product-card:hover img {
    transform: scale(1.08);
}

.product-content {
    padding: 30px;
}

.product-content h3 {
    margin-bottom: 15px;
    font-size: 24px;
}

.product-content p {
    color: #666;
    line-height: 1.7;
}

.product-content > p {
    min-height: 58px;
    margin-bottom: 28px;
}

.product-examples-title {
    margin: 0 0 14px;
    color: var(--primary);
    font-size: 15px;
    font-weight: 700;
    letter-spacing: .04em;
}

.product-examples {
    display: grid;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.product-examples li {
    position: relative;
    padding-left: 18px;
    color: var(--text);
    font-size: 15px;
    line-height: 1.6;
}

.product-examples li::before {
    content: "";
    position: absolute;
    top: 8px;
    left: 0;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--accent);
}

.product-link {
    display: inline-block;
    margin-top: 20px;
    color: #2563eb;
    font-weight: 600;
    text-decoration: none;
}

/* =========================
   Contact
========================= */

.contact {
    padding: 140px 0;
    background: #F8FAFC;
}

.contact-inner {
    text-align: center;
}

.contact h2 {
    margin-bottom: 24px;
    font-size: 48px;
}

.contact-text {
    margin-bottom: 50px;
    color: var(--text);
    font-size: 20px;
}

.contact-grid {
    max-width: 900px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    text-align: left;
}

.contact-card {
    min-height: 130px;
    padding: 28px;
    display: flex;
    align-items: center;
    gap: 20px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: white;
    transition: transform .3s ease, border-color .3s ease, box-shadow .3s ease;
}

.contact-card:hover {
    transform: translateY(-6px);
    border-color: rgba(37, 99, 235, .25);
    box-shadow: 0 18px 40px rgba(15, 23, 42, .07);
}

.contact-icon {
    flex: 0 0 50px;
    width: 50px;
    height: 50px;
    display: grid;
    place-items: center;
    border-radius: 16px;
    background: #EFF6FF;
    color: var(--accent);
}

.contact-icon svg {
    width: 25px;
    height: 25px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.contact-card > div:last-child {
    min-width: 0;
}

.contact-label {
    display: block;
    margin-bottom: 7px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.contact-card strong,
.contact-card a {
    color: var(--primary);
    font-size: 16px;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

.contact-card a:hover {
    color: var(--accent);
}

.contact-actions {
    margin-top: 40px;
    display: flex;
    justify-content: center;
    gap: 16px;
}

/* =========================
   Footer
========================= */

.footer {
    margin-top: 120px;
    background: #0F172A;
    color: white;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1.3fr;
    gap: 60px;
    padding: 80px 0 50px;
}

.footer h3 {
    margin-bottom: 20px;
    font-size: 32px;
}

.footer h4 {
    margin-bottom: 18px;
    color: #CBD5E1;
}

.footer-brand p {
    max-width: 420px;
    color: #94A3B8;
    line-height: 1.9;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.footer-links a {
    color: #CBD5E1;
    transition: .3s;
}

.footer-links a:hover {
    color: white;
}

.footer-contact p {
    margin-bottom: 14px;
    color: #CBD5E1;
}

.footer-bottom {
    padding: 24px;
    border-top: 1px solid rgba(255, 255, 255, .08);
    color: #94A3B8;
    font-size: 14px;
    text-align: center;
}

/* =========================
   Motion and reveal effects
========================= */

.reveal {
    opacity: 0;
    transform: translateY(36px);
    transition: opacity .75s ease, transform .75s ease;
}

.reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.reveal-delay-1 { transition-delay: .1s; }
.reveal-delay-2 { transition-delay: .2s; }
.reveal-delay-3 { transition-delay: .3s; }

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-14px); }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.25);
        opacity: .75;
    }
}

@keyframes rotateOrbit {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* =========================
   Right-to-left languages
========================= */

html[dir="rtl"] body {
    font-family: "Noto Sans Arabic", Arial, sans-serif;
}

html[dir="rtl"] .hero-inner {
    direction: rtl;
}

html[dir="rtl"] .hero-content {
    text-align: right;
}

html[dir="rtl"] .about-text,
html[dir="rtl"] .partners-text,
html[dir="rtl"] .why-text,
html[dir="rtl"] .products-notice {
    text-align: right;
}

html[dir="rtl"] .card-link span {
    transform: rotate(180deg);
}

html[dir="rtl"] .product-examples li {
    padding-left: 0;
    padding-right: 18px;
}

html[dir="rtl"] .product-examples li::before {
    left: auto;
    right: 0;
}

html[dir="rtl"] .button {
    flex-direction: row-reverse;
}

/* =========================
   Responsive layouts
========================= */

@media (max-width: 900px) {
    .hero-inner {
        grid-template-columns: 1fr;
        gap: 40px;
        text-align: center;
    }

    .hero-content {
        text-align: center;
    }

    .hero-description {
        margin-left: auto;
        margin-right: auto;
    }

    .hero-visual svg {
        width: min(320px, 100%);
    }

    .hero-stats {
        justify-content: center;
        flex-wrap: wrap;
        gap: 40px;
    }

    .cards,
    .why-grid,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        gap: 40px;
    }

    .product-content > p {
        min-height: auto;
    }
}

@media (max-width: 760px) {
    .language-switcher {
        gap: 1px;
    }

    .language-button {
        min-width: 32px;
        padding: 0 6px;
    }

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

    .contact-card {
        min-height: auto;
    }
}

@media (max-width: 640px) {
    .header-inner {
        height: 64px;
    }

    .nav {
        gap: 18px;
        font-size: 13px;
    }

    .contact h2,
    .about h2,
    .business h2,
    .products h2 {
        font-size: 36px;
    }

    .products {
        padding: 72px 0;
    }

    .products-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }

    .product-content {
        padding: 24px;
    }

    .contact-actions {
        flex-direction: column;
        align-items: center;
    }

    .contact-actions .button {
        width: 100%;
        max-width: 260px;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
}
