/* ============================================================================
   OSHM — coming soon page : shared foundation
   The two designs only change the tokens + a handful of surface styles
   (theme-a.css / theme-b.css). Everything structural lives here.
   ========================================================================= */

/* ------------------------------------------------------------------ tokens */
:root {
    /* typography */
    --font-sans: "Raleway", "Helvetica Neue", Arial,
                 "PingFang HK", "PingFang TC", "Microsoft JhengHei", "Noto Sans TC",
                 -apple-system, "Segoe UI", Roboto, sans-serif;
    --font-cjk: "PingFang HK", "PingFang TC", "Microsoft JhengHei", "Noto Sans TC",
                "Heiti TC", sans-serif;
    --tracking-wide: .16em;

    /* rhythm */
    --page-pad: clamp(1.25rem, 4vw, 2.5rem);
    --gap-sm: .75rem;
    --gap-md: clamp(1.25rem, 3vw, 2rem);
    --gap-lg: clamp(2rem, 6vw, 3.5rem);
    --radius: 3px;

    /* theme defaults — overridden by theme-a.css / theme-b.css */
    --bg: #fff;
    --ink: #494743;
    --ink-soft: #6f6c66;
    --ink-faint: #9b9791;
    --accent: #0db8ca;
    --accent-soft: rgba(13, 184, 202, .12);
    --line: rgba(73, 71, 67, .14);
    --panel: #fff;
    --panel-line: rgba(73, 71, 67, .12);
    --panel-shadow: 0 18px 40px -28px rgba(20, 30, 34, .45);
    --focus: #0a9aab;
}

/* ------------------------------------------------------------------- reset */
*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body,
h1, h2, p, ul, li, figure, img { margin: 0; padding: 0; }

ul { list-style: none; }

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

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

button {
    font: inherit;
    color: inherit;
    background: none;
    border: 0;
    cursor: pointer;
}

[hidden] { display: none !important; }

.visually-hidden {
    position: absolute !important;
    width: 1px; height: 1px;
    margin: -1px; padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
}

:focus-visible {
    outline: 2px solid var(--focus);
    outline-offset: 3px;
    border-radius: 2px;
}

/* ------------------------------------------------------------------- page */
body {
    min-height: 100vh;
    min-height: 100svh;
    background: var(--bg);
    color: var(--ink);
    font-family: var(--font-sans);
    font-size: clamp(1rem, .95rem + .15vw, 1.0625rem);
    font-weight: 400;
    line-height: 1.7;
    letter-spacing: .01em;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

.page {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--gap-lg);
    min-height: 100vh;
    min-height: 100svh;
    padding: calc(var(--page-pad) + 1rem) var(--page-pad) var(--page-pad);
    text-align: center;
}

.wrap {
    width: 100%;
    max-width: 46rem;
}

/* -------------------------------------------------------------- decorative */
/* Purely ornamental layer: an oversized, very quiet watermark of the OSHM mark. */
.wash {
    position: absolute;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}

.wash-mark {
    position: absolute;
    width: min(72vw, 660px);
    height: auto;
    opacity: .05;
}

/* -------------------------------------------------------------------- brand */
.brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: clamp(.9rem, 2.5vw, 1.35rem);
}

.brand-logo {
    width: clamp(8.5rem, 24vw, 12.5rem);
    filter: drop-shadow(0 1px 0 rgba(0, 0, 0, .02));
}

.brand-mark { /* full lock-up used by design B (repainted in theme-b.css) */
    width: clamp(5.5rem, 16vw, 7.75rem);
}

.brand-tagline {
    max-width: 34rem;
    font-family: var(--font-sans);
    font-size: clamp(.72rem, 2.6vw, .8125rem);
    font-weight: 600;
    letter-spacing: var(--tracking-wide);
    line-height: 1.9;
    text-transform: uppercase;
    color: var(--ink-soft);
}

/* CJK looks better with a slightly tighter tracking */
.brand-tagline:lang(zh) { letter-spacing: .12em; font-weight: 500; }

/* ------------------------------------------------------------------- notice */
.notice {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: clamp(.9rem, 2.4vw, 1.25rem);
}

.notice-title {
    max-width: 22ch;
    font-size: clamp(1.5rem, 5.6vw, 2.35rem);
    font-weight: 700;
    line-height: 1.28;
    letter-spacing: .005em;
    text-wrap: balance;
    color: var(--ink);
}

.notice-lead {
    max-width: 32ch;
    font-size: clamp(.95rem, 3.4vw, 1.0625rem);
    line-height: 1.85;
    color: var(--ink-soft);
    text-wrap: pretty;
}

/* thin "work in progress" sweep under the headline */
.progress {
    position: relative;
    width: 9rem;
    height: 2px;
    overflow: hidden;
    border-radius: 2px;
    background: var(--accent-soft);
    --bar: var(--accent);
}

.progress span {
    position: absolute;
    inset: 0 auto 0 0;
    width: 40%;
    border-radius: inherit;
    background: linear-gradient(90deg, transparent, var(--bar), transparent);
    animation: oshm-sweep 2.6s cubic-bezier(.65, .05, .35, .95) infinite;
}

@keyframes oshm-sweep {
    0%   { transform: translateX(-120%); }
    100% { transform: translateX(320%); }
}

/* ------------------------------------------------------------------ contact */
.contact {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: clamp(1rem, 3vw, 1.5rem);
}

.contact-title {
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: var(--tracking-wide);
    text-transform: uppercase;
    color: var(--ink-faint);
}

.contact-list {
    display: grid;
    gap: 1px;
    text-align: left;
    background: var(--panel-line); /* the 1px gaps become the hairlines */
    border: 1px solid var(--panel-line);
    border-radius: var(--radius);
    overflow: hidden;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: .9rem;
    padding: clamp(1rem, 3vw, 1.35rem);
    background: var(--panel);
}

.ci-icon {
    flex: none;
    display: grid;
    place-items: center;
    width: 2.125rem;
    height: 2.125rem;
    margin-top: .1rem;
    border-radius: 50%;
    background: var(--accent-soft);
    color: var(--accent);
}

.ci-icon svg { width: 1.05rem; height: 1.05rem; }

.ci-body {
    display: flex;
    flex-direction: column;
    gap: .3rem;
    min-width: 0;
}

.ci-label {
    font-size: .6875rem;
    font-weight: 700;
    letter-spacing: var(--tracking-wide);
    text-transform: uppercase;
    color: var(--ink-faint);
}

.ci-value {
    font-size: clamp(.95rem, 3.2vw, 1.0625rem);
    font-weight: 500;
    line-height: 1.6;
    color: var(--ink);
    overflow-wrap: anywhere;
}

a.ci-value {
    text-decoration: underline;
    text-decoration-color: var(--line);
    text-decoration-thickness: 1px;
    text-underline-offset: .28em;
    transition: color .18s ease, text-decoration-color .18s ease;
}

a.ci-value:hover {
    color: var(--accent);
    text-decoration-color: currentColor;
}

.ci-actions {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    margin-top: .45rem;
    flex-wrap: wrap;
}

.copy {
    padding: .18rem .6rem;
    font-size: .6875rem;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--ink-soft);
    border: 1px solid var(--line);
    border-radius: 999px;
    transition: color .18s ease, border-color .18s ease, background-color .18s ease;
}

.copy:hover {
    color: var(--accent);
    border-color: var(--accent);
    background: var(--accent-soft);
}

/* ------------------------------------------------------------------- footer */
.footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    font-size: .8125rem;
    color: var(--ink-faint);
}

.langs {
    display: inline-flex;
    align-items: center;
    gap: .25rem;
    padding: .25rem;
    border: 1px solid var(--line);
    border-radius: 999px;
}

.langs a {
    padding: .3rem .8rem;
    border-radius: 999px;
    font-size: .75rem;
    font-weight: 600;
    letter-spacing: .04em;
    color: var(--ink-soft);
    transition: color .18s ease, background-color .18s ease;
}

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

.langs a[aria-current] {
    color: #fff;
    background: var(--accent);
}

.copyright {
    line-height: 1.9;
    max-width: 40rem;
}

.copyright .sep { padding: 0 .5em; opacity: .55; }

/* ---------------------------------------------------------- preview switch */
/* Only rendered when the page is opened with ?preview=1 — lets you flip       */
/* between design A and design B while reviewing, invisible in production.     */
.preview-switch {
    position: fixed;
    z-index: 20;
    right: 1rem;
    bottom: 1rem;
    display: inline-flex;
    gap: .25rem;
    padding: .25rem;
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: .06em;
    background: rgba(255, 255, 255, .92);
    border: 1px solid rgba(0, 0, 0, .12);
    border-radius: 999px;
    box-shadow: 0 10px 30px -12px rgba(0, 0, 0, .5);
    backdrop-filter: blur(6px);
}

.preview-switch a {
    padding: .35rem .8rem;
    border-radius: 999px;
    color: #494743;
}

.preview-switch a[aria-current] {
    color: #fff;
    background: #0db8ca;
}

/* -------------------------------------------------------------------- toast */
.toast {
    position: fixed;
    z-index: 30;
    left: 50%;
    bottom: 1.5rem;
    transform: translate(-50%, .75rem);
    padding: .5rem 1.1rem;
    font-size: .8125rem;
    font-weight: 600;
    color: #fff;
    background: rgba(30, 30, 30, .92);
    border-radius: 999px;
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s ease, transform .2s ease;
}

.toast.is-visible {
    opacity: 1;
    transform: translate(-50%, 0);
}

/* ------------------------------------------------------------------- motion */
@media (prefers-reduced-motion: no-preference) {

    .page > * {
        animation: oshm-rise .7s cubic-bezier(.22, .61, .36, 1) both;
    }

    .page > *:nth-child(2) { animation-delay: .08s; }
    .page > *:nth-child(3) { animation-delay: .16s; }
    .page > *:nth-child(4) { animation-delay: .24s; }
    .page > *:nth-child(5) { animation-delay: .32s; }

    @keyframes oshm-rise {
        from { opacity: 0; transform: translateY(14px); }
        to   { opacity: 1; transform: translateY(0); }
    }
}

/* On a laptop the whole page should fit on one screen without scrolling. */
@media (min-width: 60rem) and (max-height: 60rem) {

    .page {
        gap: clamp(.9rem, 2.2vh, 1.6rem);
        padding-top: clamp(1.5rem, 4vh, 2.5rem);
    }

    .brand { gap: .7rem; }
    .brand-logo { width: clamp(6rem, 13vh, 9rem); }
    .brand-mark { width: clamp(4.5rem, 10.5vh, 5.75rem); }
    .brand-tagline { line-height: 1.7; }

    .notice { gap: clamp(.5rem, 1.4vh, .9rem); }
    .notice-title { font-size: clamp(1.35rem, 4.1vh, 2rem); }
    .notice-title::after { margin-top: .8rem; }

    .contact { gap: .7rem; }
    .contact-item { padding: .7rem 1.3rem .8rem; }
    .ci-icon { width: 1.75rem; height: 1.75rem; }
    .ci-body { gap: .2rem; }
    .ci-actions { margin-top: .25rem; }
    .footer { gap: .6rem; }
}

@media (prefers-reduced-motion: reduce) {
    .progress span { animation: none; inset: 0; width: 100%; }
}

/* ---------------------------------------------------------------- printable */
@media print {
    .page { min-height: auto; gap: 1.5rem; }
    .progress, .langs, .preview-switch, .toast, .wash { display: none !important; }
    a { text-decoration: none; }
}
