/* ============================================
   株式会社NIBEN. Corporate Website
   Design based on business card aesthetic:
   - Primary: Teal/Cerulean Blue #1E9AAE
   - Background: Warm Off-White #FAF6F0
   - Clean, minimalist, professional
   ============================================ */

/* ---- CSS Variables ---- */
:root {
    --teal: #1E9AAE;
    --teal-dark: #177d8e;
    --teal-light: #2AACBD;
    --teal-lighter: #e8f6f8;
    --teal-bg: #1a8d9f;
    --cream: #FAF6F0;
    --white: #ffffff;
    --text-dark: #2c2c2c;
    --text-mid: #555555;
    --text-light: #888888;
    --border: #e0ddd8;
    --shadow-sm: 0 2px 8px rgba(30, 154, 174, 0.08);
    --shadow-md: 0 4px 20px rgba(30, 154, 174, 0.12);
    --shadow-lg: 0 8px 40px rgba(30, 154, 174, 0.15);
    --radius: 8px;
    --radius-lg: 16px;
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --font-sans: 'Noto Sans JP', 'Hiragino Kaku Gothic ProN', 'Yu Gothic', sans-serif;
    --font-serif: 'Noto Serif JP', 'Hiragino Mincho ProN', 'Yu Mincho', serif;
}

/* ---- Reset & Base ---- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
    scroll-padding-top: 80px;
}

body {
    font-family: var(--font-sans);
    color: var(--text-dark);
    background-color: var(--cream);
    line-height: 1.8;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

a {
    color: var(--teal);
    text-decoration: none;
    transition: color var(--transition);
}

a:hover {
    color: var(--teal-dark);
}

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

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ---- Header ---- */
#header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(250, 246, 240, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: box-shadow var(--transition), background var(--transition);
}

#header.scrolled {
    box-shadow: 0 1px 12px rgba(0,0,0,0.08);
}

.header-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
}

/* Logo */
.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--teal);
    font-weight: 600;
    font-size: 1.3rem;
    letter-spacing: 0.1em;
}

.logo:hover {
    color: var(--teal-dark);
}

.logo-img {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

.logo-text {
    font-family: var(--font-sans);
    font-weight: 700;
    letter-spacing: 0.15em;
}

/* Desktop Nav */
.nav-desktop ul {
    display: flex;
    list-style: none;
    gap: 32px;
    align-items: center;
}

.nav-desktop a {
    color: var(--text-dark);
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    position: relative;
    padding: 4px 0;
}

.nav-desktop a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--teal);
    transition: width var(--transition);
}

.nav-desktop a:hover::after,
.nav-desktop a.active::after {
    width: 100%;
}

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

.nav-cta {
    background: var(--teal) !important;
    color: var(--white) !important;
    padding: 8px 20px !important;
    border-radius: 50px;
    font-size: 0.85rem !important;
}

.nav-cta::after {
    display: none !important;
}

.nav-cta:hover {
    background: var(--teal-dark) !important;
    color: var(--white) !important;
}

/* Hamburger */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 6px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 1001;
}

.hamburger span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--teal);
    transition: var(--transition);
    border-radius: 2px;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 6px);
}

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

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -6px);
}

/* Mobile Nav */
.nav-mobile {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background: var(--cream);
    z-index: 999;
    transition: right var(--transition);
    padding: 100px 40px 40px;
    box-shadow: -4px 0 30px rgba(0,0,0,0.1);
}

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

.nav-mobile ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.nav-mobile a {
    display: block;
    padding: 16px 0;
    color: var(--text-dark);
    font-size: 1rem;
    font-weight: 500;
    border-bottom: 1px solid var(--border);
    letter-spacing: 0.05em;
}

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

/* Mobile overlay */
.nav-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.3);
    z-index: 998;
}

.nav-overlay.active {
    display: block;
}

/* ---- HERO ---- */
#hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
    background: linear-gradient(135deg, var(--cream) 0%, #e8f4f6 50%, var(--cream) 100%);
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.06;
    background-image: 
        repeating-linear-gradient(45deg, var(--teal) 0, var(--teal) 1px, transparent 0, transparent 50%),
        repeating-linear-gradient(-45deg, var(--teal) 0, var(--teal) 1px, transparent 0, transparent 50%);
    background-size: 60px 60px;
}

.hero-content {
    position: relative;
    z-index: 2;
    padding: 0 24px;
}

.hero-tagline {
    font-family: var(--font-serif);
    font-size: 1rem;
    color: var(--teal);
    letter-spacing: 0.3em;
    margin-bottom: 24px;
}

.hero-title {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 0.15em;
    margin-bottom: 8px;
    line-height: 1;
}

.hero-company {
    font-family: var(--font-sans);
    font-size: 1.8rem;
    font-weight: 500;
    color: var(--teal);
    letter-spacing: 0.08em;
}

.hero-brand {
    font-family: var(--font-sans);
    font-size: 4.5rem;
    font-weight: 700;
    color: var(--teal);
    letter-spacing: 0.18em;
}

.hero-desc {
    font-size: 1rem;
    color: var(--text-mid);
    line-height: 2;
    margin-top: 32px;
    margin-bottom: 0;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 32px;
    border-radius: 50px;
    font-size: 0.95rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: all var(--transition);
    border: 2px solid transparent;
    text-decoration: none;
}

.btn-primary {
    background: var(--teal);
    color: var(--white);
    border-color: var(--teal);
}

.btn-primary:hover {
    background: var(--teal-dark);
    border-color: var(--teal-dark);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-outline {
    background: transparent;
    color: var(--teal);
    border-color: var(--teal);
}

.btn-outline:hover {
    background: var(--teal);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-lg {
    padding: 16px 48px;
    font-size: 1rem;
}

/* Hero Scroll Indicator */
.hero-scroll {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: var(--teal);
    font-size: 0.7rem;
    letter-spacing: 0.2em;
}

.scroll-line {
    width: 1px;
    height: 40px;
    background: var(--teal);
    animation: scrollDown 1.5s ease-in-out infinite;
}

@keyframes scrollDown {
    0% { transform: scaleY(0); transform-origin: top; opacity: 1; }
    50% { transform: scaleY(1); transform-origin: top; opacity: 1; }
    51% { transform: scaleY(1); transform-origin: bottom; opacity: 1; }
    100% { transform: scaleY(0); transform-origin: bottom; opacity: 1; }
}

/* ---- Sections ---- */
.section {
    padding: 100px 0;
}

.section-teal {
    background: var(--teal);
    color: var(--white);
}

.section-light {
    background: var(--white);
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-header.light .section-en,
.section-header.light .section-title {
    color: var(--white);
}

.section-header.light .section-line {
    background: rgba(255,255,255,0.4);
}

.section-en {
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.3em;
    color: var(--teal);
    text-transform: uppercase;
    margin-bottom: 8px;
}

.section-title {
    font-family: var(--font-serif);
    font-size: 2rem;
    font-weight: 600;
    color: var(--text-dark);
    letter-spacing: 0.1em;
}

.section-line {
    width: 40px;
    height: 2px;
    background: var(--teal);
    margin: 16px auto 0;
}

/* ---- ABOUT ---- */
.about-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 50px;
}

.about-lead {
    font-family: var(--font-serif);
    font-size: 1.2rem;
    line-height: 2;
    color: var(--teal);
    margin-bottom: 20px;
}

.about-text {
    font-size: 0.95rem;
    line-height: 2;
    color: var(--text-mid);
}

.about-table table {
    width: 100%;
    border-collapse: collapse;
}

.about-table tr {
    border-bottom: 1px solid var(--border);
}

.about-table th {
    text-align: left;
    padding: 16px 20px;
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--teal);
    white-space: nowrap;
    width: 140px;
    vertical-align: top;
    background: rgba(30, 154, 174, 0.04);
}

.about-table td {
    padding: 16px 20px;
    font-size: 0.95rem;
    color: var(--text-dark);
    line-height: 1.8;
}

.about-table td a {
    color: var(--teal);
}

.about-table td a:hover {
    text-decoration: underline;
}

/* ---- SERVICES ---- */
.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.service-card {
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: var(--radius-lg);
    padding: 40px 28px;
    text-align: center;
    transition: all var(--transition);
    backdrop-filter: blur(4px);
}

.service-card:hover {
    background: rgba(255,255,255,0.2);
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.1);
}

.service-icon {
    width: 64px;
    height: 64px;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 1.5rem;
    color: var(--white);
}

.service-card h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 12px;
    letter-spacing: 0.05em;
}

.service-card p {
    font-size: 0.85rem;
    line-height: 1.8;
    opacity: 0.9;
}

/* ---- PHILOSOPHY ---- */
.philosophy-content {
    max-width: 800px;
    margin: 0 auto;
}

.philosophy-main {
    text-align: center;
    margin-bottom: 60px;
}

.philosophy-symbol {
    color: var(--teal);
    margin-bottom: 24px;
}

.philosophy-symbol svg {
    width: 160px;
    height: 60px;
}

.philosophy-catch {
    font-family: var(--font-serif);
    font-size: 1.6rem;
    font-weight: 600;
    color: var(--teal);
    line-height: 2;
    margin-bottom: 24px;
    letter-spacing: 0.05em;
}

.philosophy-text {
    font-size: 0.95rem;
    line-height: 2;
    color: var(--text-mid);
    max-width: 600px;
    margin: 0 auto;
}

.philosophy-values {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.value-item {
    display: flex;
    gap: 24px;
    align-items: flex-start;
    padding: 28px;
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition);
}

.value-item:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.value-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--teal);
    opacity: 0.3;
    line-height: 1;
    min-width: 50px;
    font-family: var(--font-sans);
}

.value-content h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--teal);
    margin-bottom: 8px;
    letter-spacing: 0.05em;
}

.value-content p {
    font-size: 0.9rem;
    line-height: 1.8;
    color: var(--text-mid);
}

/* ---- ACCESS ---- */
.access-content {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 40px;
    align-items: start;
}

.access-info {
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.access-detail {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.access-icon {
    width: 44px;
    height: 44px;
    background: var(--teal-lighter);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--teal);
    font-size: 1rem;
    flex-shrink: 0;
}

.access-detail h4 {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--teal);
    margin-bottom: 4px;
    letter-spacing: 0.05em;
}

.access-detail p {
    font-size: 0.9rem;
    line-height: 1.8;
    color: var(--text-dark);
}

.access-detail a {
    color: var(--teal);
}

.access-detail a:hover {
    text-decoration: underline;
}

.access-map {
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.access-map iframe {
    display: block;
    border-radius: var(--radius-lg);
}

/* ---- CONTACT ---- */
.contact-content {
    max-width: 760px;
    margin: 0 auto;
}

.contact-lead {
    text-align: center;
    font-size: 0.95rem;
    color: var(--text-mid);
    line-height: 2;
    margin-bottom: 40px;
}

.contact-form {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 48px;
    box-shadow: var(--shadow-sm);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group.full-width {
    margin-bottom: 24px;
}

.form-group label {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-dark);
    margin-bottom: 6px;
    letter-spacing: 0.03em;
}

.required {
    background: var(--teal);
    color: var(--white);
    font-size: 0.65rem;
    padding: 2px 6px;
    border-radius: 3px;
    margin-left: 6px;
    font-weight: 500;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-family: var(--font-sans);
    font-size: 0.95rem;
    color: var(--text-dark);
    background: var(--cream);
    transition: border-color var(--transition), box-shadow var(--transition);
    outline: none;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--teal);
    box-shadow: 0 0 0 3px rgba(30, 154, 174, 0.12);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-light);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.form-submit {
    text-align: center;
    margin-top: 8px;
}

.form-submit button {
    font-family: var(--font-sans);
    border: none;
}

.form-success {
    text-align: center;
    padding: 60px 24px;
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.form-success i {
    font-size: 3rem;
    color: var(--teal);
    margin-bottom: 16px;
}

.form-success h3 {
    font-size: 1.3rem;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.form-success p {
    color: var(--text-mid);
    font-size: 0.95rem;
}

/* ---- FOOTER ---- */
#footer {
    background: #1a2a2d;
    color: rgba(255,255,255,0.7);
    padding: 60px 0 0;
}

.footer-top {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1.5fr;
    gap: 40px;
    padding-bottom: 40px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--teal-light);
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    margin-bottom: 8px;
}

.footer-logo-img {
    width: 34px;
    height: 34px;
    object-fit: contain;
}

.footer-tagline {
    font-family: var(--font-serif);
    font-size: 0.85rem;
    color: rgba(255,255,255,0.5);
    letter-spacing: 0.15em;
}

.footer-nav h4,
.footer-contact h4 {
    color: var(--white);
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    margin-bottom: 16px;
}

.footer-nav ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-nav a {
    color: rgba(255,255,255,0.6);
    font-size: 0.85rem;
    transition: color var(--transition);
}

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

.footer-contact p {
    font-size: 0.85rem;
    margin-bottom: 8px;
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.footer-contact i {
    color: var(--teal-light);
    width: 16px;
    text-align: center;
    margin-top: 4px;
}

.footer-contact a {
    color: rgba(255,255,255,0.6);
}

.footer-contact a:hover {
    color: var(--teal-light);
}

.footer-bottom {
    text-align: center;
    padding: 20px 0;
    font-size: 0.75rem;
    color: rgba(255,255,255,0.4);
    letter-spacing: 0.05em;
}

/* ---- Back to Top ---- */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--teal);
    color: var(--white);
    border: none;
    cursor: pointer;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all var(--transition);
    box-shadow: var(--shadow-md);
    z-index: 100;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background: var(--teal-dark);
    transform: translateY(-2px);
}

/* ---- Animations ---- */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.8s ease forwards;
}

.delay-1 { animation-delay: 0.2s; }
.delay-2 { animation-delay: 0.4s; }
.delay-3 { animation-delay: 0.6s; }

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Scroll reveal */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

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

/* ---- Responsive ---- */
@media (max-width: 1024px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .nav-desktop {
        display: none;
    }

    .hamburger {
        display: flex;
    }

    .hero-brand {
        font-size: 2.8rem;
    }

    .hero-company {
        font-size: 1.3rem;
    }

    .hero-title {
        flex-wrap: wrap;
        gap: 0;
    }

    .section {
        padding: 70px 0;
    }

    .section-title {
        font-size: 1.6rem;
    }

    .services-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .service-card {
        padding: 28px 24px;
    }

    .access-content {
        grid-template-columns: 1fr;
    }

    .access-map iframe {
        height: 280px;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .contact-form {
        padding: 28px 20px;
    }

    .footer-top {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .philosophy-catch {
        font-size: 1.2rem;
    }

    .value-item {
        flex-direction: column;
        gap: 12px;
        padding: 24px;
    }

    .value-number {
        min-width: auto;
    }

    .sp-br {
        display: none;
    }
}

@media (max-width: 480px) {
    html {
        font-size: 14px;
    }

    .header-inner {
        height: 60px;
    }

    html {
        scroll-padding-top: 60px;
    }

    .hero-brand {
        font-size: 2.2rem;
    }

    .hero-company {
        font-size: 1.1rem;
    }

    .about-table th {
        display: block;
        width: 100%;
        padding: 12px 16px 4px;
    }

    .about-table td {
        display: block;
        padding: 4px 16px 12px;
    }

    .about-lead {
        font-size: 1rem;
    }

    .back-to-top {
        bottom: 16px;
        right: 16px;
        width: 40px;
        height: 40px;
        font-size: 0.85rem;
    }
}
