/* HAMIDAS Corporate Custom Styles */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@400;500;700;900&family=Plus+Jakarta+Sans:wght@500;700;800&family=Syne:wght@700;800&display=swap');

body {
    font-family: 'Plus Jakarta Sans', 'Noto Sans JP', sans-serif;
    background-color: #FFFFFF;
    color: #111113;
}

.font-display {
    font-family: 'Syne', sans-serif;
}

.bg-grid-subtle {
    background-image: radial-gradient(rgba(17, 17, 19, 0.04) 1px, transparent 0);
    background-size: 24px 24px;
}

/* Hero headline
   Keep each Japanese phrase intact so the desktop hero never breaks at an awkward character. */
.hero-title {
    margin: 0;
    max-width: 100%;
    color: #111113;
    font-family: 'Plus Jakarta Sans', 'Noto Sans JP', sans-serif;
    font-size: clamp(2.15rem, 3.45vw, 2.9rem);
    font-weight: 900;
    line-height: 1.32;
    letter-spacing: -0.035em;
    text-align: left;
    word-break: keep-all;
    overflow-wrap: normal;
}

.hero-title-chunk {
    display: block;
    width: max-content;
    max-width: 100%;
    white-space: nowrap;
}

.hero-title-chunk + .hero-title-chunk {
    margin-top: 0.08em;
}

.hero-title-accent {
    display: block;
    width: max-content;
    max-width: 100%;
    margin-top: 0.14em !important;
    padding: 0.08em 0.16em 0.1em;
    background: #F5B800;
    color: #111113 !important;
    font-size: 1.38em !important;
    line-height: 1.06;
    letter-spacing: -0.055em;
    font-weight: 900;
}

/* Keep the two-line composition stable through the tablet range. */
@media (max-width: 1023px) {
    .hero-title {
        font-size: clamp(2rem, 5.3vw, 2.75rem);
        line-height: 1.34;
    }
}

/* On small phones, scale the complete phrase instead of breaking Japanese mid-copy. */
@media (max-width: 639px) {
    .hero-title {
        font-size: clamp(1.55rem, 7vw, 2.15rem);
        line-height: 1.4;
        letter-spacing: -0.045em;
    }

    .hero-title-accent {
        font-size: 1.18em !important;
        padding: 0.08em 0.14em 0.1em;
    }
}

/* =========================================================
   HAMIDAS Design Refinement
   Structure and palette are unchanged.
   ========================================================= */
:root {
    --hamidas-ink: #111113;
    --hamidas-muted: #5A5A62;
    --hamidas-border: #E5E5EA;
    --hamidas-surface: #FAFAFC;
    --hamidas-brand: #F5B800;
    --hamidas-brand-hover: #E0A700;
    --hamidas-white: #FFFFFF;
}

html {
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    line-height: 1.75;
    font-feature-settings: "palt" 1;
}

p, dd, li {
    line-break: strict;
    word-break: normal;
}

/* Header */
.site-header {
    border-bottom: 1px solid var(--hamidas-border) !important;
}

.site-header > div {
    min-height: 72px;
}

.site-header img {
    display: block;
}

.site-header nav {
    align-self: stretch;
}

.site-header nav a {
    display: inline-flex;
    align-items: center;
    letter-spacing: .065em;
    line-height: 1;
}

.site-header a[href="contact.html"] {
    letter-spacing: .045em;
}

/* Typography hierarchy */
.section-kicker {
    letter-spacing: .16em !important;
    line-height: 1.3;
    font-weight: 700 !important;
}

.page-title,
.section-title {
    color: var(--hamidas-ink);
    font-weight: 900 !important;
    letter-spacing: -.045em;
    line-height: 1.16;
}

.page-title {
    font-size: clamp(2.25rem, 4vw, 3rem) !important;
}

.section-title {
    font-size: clamp(1.7rem, 2.5vw, 2.1rem) !important;
}

/* Buttons */
.cta-primary {
    border: 1px solid var(--hamidas-brand) !important;
    border-radius: .55rem !important;
    background: var(--hamidas-brand) !important;
    color: var(--hamidas-ink) !important;
    box-shadow: none !important;
    font-weight: 800 !important;
    line-height: 1.2;
}

.cta-primary:hover {
    background: var(--hamidas-brand-hover) !important;
    border-color: var(--hamidas-brand-hover) !important;
    color: var(--hamidas-ink) !important;
}

/* Hero */
.hero-kicker {
    border-radius: .45rem !important;
    letter-spacing: .045em;
    line-height: 1.2;
}

.hero-title {
    font-size: clamp(2.55rem, 4vw, 3.35rem);
    line-height: 1.18;
    letter-spacing: -.055em;
}

.hero-title-chunk + .hero-title-chunk {
    margin-top: .16em;
}

.hero-title-accent {
    padding: .09em .15em .11em;
    background: var(--hamidas-brand);
    color: var(--hamidas-ink) !important;
    font-size: 1.25em !important;
    line-height: 1.02;
    letter-spacing: -.065em;
}

.hero-copy {
    max-width: 42rem;
    line-height: 1.95 !important;
}

.hero-brand-card {
    border-width: 1px !important;
    border-radius: 1rem !important;
    box-shadow: none !important;
}

.hero-brand-card .philosophy-box {
    border-radius: .65rem !important;
}

/* Hero Video */
.hero-video-section {
    min-height: 560px;
    height: 88vh;
    max-height: 820px;
    background-color: var(--hamidas-ink);
}

.hero-video {
    z-index: 0;
    object-position: center;
}

.hero-video-overlay {
    z-index: 1;
    background: linear-gradient(
        90deg,
        rgba(17, 17, 19, 0.82) 0%,
        rgba(17, 17, 19, 0.62) 42%,
        rgba(17, 17, 19, 0.30) 75%,
        rgba(17, 17, 19, 0.15) 100%
    ), linear-gradient(
        0deg,
        rgba(17, 17, 19, 0.35) 0%,
        rgba(17, 17, 19, 0.0) 30%
    );
}

.hero-title--onvideo {
    color: #FFFFFF;
}

.hero-copy--onvideo {
    color: rgba(255, 255, 255, 0.86) !important;
}

@media (max-width: 767px) {
    .hero-video-section {
        height: auto;
        min-height: 0;
        aspect-ratio: 16 / 9;
        background-color: var(--hamidas-brand);
    }

    .hero-video {
        object-fit: contain;
        object-position: center center;
    }
}

@media (max-width: 639px) {
    .hero-video-section {
        aspect-ratio: 16 / 9;
        min-height: 0;
    }
}

/* Branding Works */
.work-image-wrap {
    aspect-ratio: 4 / 3;
    background: var(--hamidas-surface);
    border: 1px solid var(--hamidas-border);
    box-shadow: 0 20px 40px -18px rgba(17, 17, 19, 0.18);
}

.work-image-wrap img {
    display: block;
    transition: transform .6s cubic-bezier(.16,1,.3,1);
}

.work-item:hover .work-image-wrap img {
    transform: scale(1.045);
}

.work-number {
    font-size: .75rem;
    opacity: .55;
}

.work-tag {
    letter-spacing: .04em;
}

.work-item + .work-item {
    position: relative;
}

@media (min-width: 1024px) {
    .work-item {
        position: relative;
    }
}

/* Cards */
.content-card,
.company-card,
.business-lead,
.contact-form {
    box-shadow: none !important;
}

.content-card {
    border-radius: .9rem !important;
    padding: 2.1rem !important;
}

.content-card h3 {
    font-size: 1.3rem;
    font-weight: 800;
    letter-spacing: -.035em;
    line-height: 1.3;
}

.content-card p {
    line-height: 1.9;
}

.business-lead {
    border-left-width: 5px !important;
    border-radius: 0 .8rem .8rem 0 !important;
}

.business-lead > span:first-child {
    display: block;
    font-size: clamp(1.8rem, 3.1vw, 2.55rem) !important;
    font-weight: 800 !important;
    letter-spacing: -.02em !important;
    line-height: 1.13 !important;
    white-space: normal;
}

.company-card {
    border-width: 1px !important;
    border-radius: 1rem !important;
}

.company-card img {
    display: block;
}

.company-table dt {
    letter-spacing: .08em;
}

.company-table dd {
    line-height: 1.75;
}

/* Contact */
.contact-form {
    border-radius: 1rem !important;
}

.contact-form label {
    letter-spacing: .015em;
    font-weight: 700;
}

.contact-form input,
.contact-form select,
.contact-form textarea {
    min-height: 3.1rem;
    border-radius: .55rem !important;
    line-height: 1.5;
}

.contact-form textarea {
    min-height: 10rem;
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
    color: var(--hamidas-muted);
    opacity: .68;
}

/* Footer */
.site-footer {
    line-height: 1.5;
}

.site-footer a {
    letter-spacing: .025em;
}

/* Accessible focus using the existing brand color */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid var(--hamidas-brand);
    outline-offset: 3px;
}

@media (max-width: 1023px) {
    .hero-title {
        font-size: clamp(2.25rem, 5.4vw, 3rem);
    }
}

@media (max-width: 639px) {
    body {
        line-height: 1.7;
    }

    .page-title {
        font-size: 2.05rem !important;
    }

    .hero-title {
        font-size: clamp(1.65rem, 7.2vw, 2.2rem);
        line-height: 1.28;
    }

    .hero-title-accent {
        font-size: 1.12em !important;
        padding: .08em .12em .1em;
    }

    .content-card {
        padding: 1.6rem !important;
    }
}


/* =========================================================
   Mobile responsive correction
   Desktop layout is intentionally unchanged.
   ========================================================= */
@media (max-width: 639px) {
    html,
    body {
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
    }

    /* Header: preserve the same layout while reducing edge pressure. */
    .site-header > div {
        min-height: 64px;
        padding-left: 1rem !important;
        padding-right: 1rem !important;
        gap: .65rem !important;
    }

    .site-header img {
        max-width: 92px;
        height: auto !important;
    }

    .site-header .cta-primary {
        white-space: nowrap;
    }

    /* Hero: max-content/nowrap from desktop was the horizontal overflow source. */
    .hero-title {
        width: 100%;
        max-width: 100%;
        font-size: clamp(1.45rem, 6.25vw, 1.8rem) !important;
        line-height: 1.3;
        letter-spacing: -.045em;
    }

    .hero-title-chunk {
        display: block;
        width: fit-content;
        max-width: 100%;
        white-space: nowrap;
    }

    .hero-title-accent {
        width: fit-content;
        max-width: 100%;
        box-sizing: border-box;
        font-size: 1.1em !important;
        line-height: 1.08;
        padding: .08em .1em .1em;
        letter-spacing: -.055em;
    }

    .hero-copy {
        width: 100%;
        max-width: 100%;
        font-size: .98rem;
        line-height: 1.85 !important;
    }

    .hero-brand-card {
        width: 100%;
        max-width: 100%;
        padding: 1.5rem !important;
    }

    /* Prevent long labels/copy from creating accidental horizontal overflow. */
    .business-lead > span:first-child,
    .page-title,
    .section-title,
    .content-card h3,
    .company-table dd,
    .contact-form label,
    .site-footer {
        max-width: 100%;
        overflow-wrap: anywhere;
    }

    .business-lead > span:first-child {
        font-size: clamp(1.5rem, 7vw, 1.9rem) !important;
        line-height: 1.18 !important;
    }

    .content-card,
    .company-card,
    .contact-form {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }

    .content-card {
        padding: 1.45rem !important;
    }

    .company-card,
    .contact-form {
        padding-left: 1.35rem !important;
        padding-right: 1.35rem !important;
    }

    /* Inputs must shrink with the viewport on iOS/Android browsers. */
    .contact-form input,
    .contact-form select,
    .contact-form textarea {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        font-size: 16px;
    }

    .site-footer > div {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }
}

/* Very narrow phones (320–359px): keep the hero composition inside the viewport. */
@media (max-width: 359px) {
    .hero-title {
        font-size: 1.35rem !important;
    }

    .hero-title-accent {
        font-size: 1.06em !important;
        padding-left: .08em;
        padding-right: .08em;
    }

    .site-header > div {
        padding-left: .75rem !important;
        padding-right: .75rem !important;
    }

    .site-header .cta-primary {
        padding-left: .75rem !important;
        padding-right: .75rem !important;
    }
}

/* Shared main-content shell
   Keeps the widened 1024px content area mathematically centered on every page. */
.site-content-shell {
    width: 100%;
    max-width: 1024px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 24px;
    padding-right: 24px;
    box-sizing: border-box;
}

@media (max-width: 639px) {
    .site-content-shell {
        padding-left: 16px;
        padding-right: 16px;
    }
}


/* MISSION optical centering
   The outer shell follows the site's 1024px grid. A dedicated inner column
   controls the reading measure and receives a tiny desktop-only optical shift
   so the long left-aligned copy looks centered, not merely mathematically centered. */
.mission-shell {
    width: 100%;
    max-width: 1024px;
    margin-inline: auto;
    padding-left: 24px;
    padding-right: 24px;
    box-sizing: border-box;
}

.mission-inner {
    width: 100%;
    max-width: 880px;
    margin-inline: auto;
    box-sizing: border-box;
}

@media (min-width: 1024px) {
    .mission-inner {
        transform: translateX(12px);
    }
}

@media (min-width: 640px) and (max-width: 1023px) {
    .mission-inner {
        max-width: 860px;
        transform: translateX(6px);
    }
}

@media (max-width: 639px) {
    .mission-shell {
        padding-left: 16px;
        padding-right: 16px;
    }

    .mission-inner {
        max-width: 100%;
        transform: none;
    }
}


/* WORKS 2 x 2 case-study cards */
.works-grid {
    align-items: stretch;
}

.work-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    box-shadow: 0 18px 42px -28px rgba(17, 17, 19, 0.28);
    transition: transform .35s cubic-bezier(.16,1,.3,1), box-shadow .35s cubic-bezier(.16,1,.3,1);
}

.work-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 24px 52px -30px rgba(17, 17, 19, 0.32);
}

.work-card .work-card-image {
    aspect-ratio: 16 / 10;
    border: 0;
    border-bottom: 1px solid var(--hamidas-border);
    border-radius: 0;
    box-shadow: none;
}

.work-card .work-card-copy {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.work-card .work-card-copy p {
    margin-top: auto;
}

@media (max-width: 767px) {
    .work-card .work-card-image {
        aspect-ratio: 4 / 3;
    }
}
