/* =========================================
   日式プレミアム — Japanese Premium Design System
   大家的資訊有限公司
   ========================================= */

@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+TC:wght@300;400;500;700;900&family=Noto+Serif+TC:wght@400;700;900&display=swap');

/* ── 1. Variables ── */
:root {
  /* 和色 (Wa-iro) — Japanese Traditional Colors */
  --sumi: #1a1a1a;
  /* 墨 - Ink Black */
  --usuzumi: #666666;
  /* 薄墨 - Light Ink */
  --kinari: #f5f0e8;
  /* 生成り - Natural Cream */
  --shironeri: #faf8f2;
  /* 白練 - Warm White */
  --kitsune: #c9a96e;
  /* 狐 - Fox Gold */
  --beni: #b5495b;
  /* 紅 - Crimson */
  --kon: #1b2a4a;
  /* 紺 - Dark Indigo */
  --wasurenagusa: #7ba0c9;
  /* 勿忘草 - Forget-me-not Blue */

  /* Semantic */
  --bg-body: var(--shironeri);
  --bg-surface: #ffffff;
  --bg-accent: var(--kinari);
  --bg-dark: var(--kon);
  --text-main: var(--sumi);
  --text-sub: var(--usuzumi);
  --gold: var(--kitsune);
  --red: var(--beni);

  /* Typography */
  --font-sans: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif;
  --font-serif: "Noto Serif TC", "PingFang TC", serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;

  /* Spacing */
  --max-w: 1200px;
  --section-py: 120px;
  --radius: 4px;
  --ease: cubic-bezier(0.23, 1, 0.32, 1);
}

/* ── 2. Reset ── */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  background: var(--bg-body);
  color: var(--text-main);
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

h1,
h2,
h3,
h4 {
  font-family: var(--font-serif);
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: 0.02em;
}

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

/* ── 3. Layout ── */
.wrap {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 32px;
}

/* ── 4. Navigation ── */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(250, 248, 242, 0.88);
  backdrop-filter: blur(20px) saturate(1.8);
  -webkit-backdrop-filter: blur(20px) saturate(1.8);
  border-bottom: 1px solid rgba(201, 169, 110, 0.15);
  transition: all 0.4s var(--ease);
}

.nav.scrolled {
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.06);
}

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

.nav-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 18px;
  letter-spacing: 0.05em;
}

.nav-brand-logo {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  overflow: hidden;
}

.nav-brand-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-link {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-sub);
  padding: 8px 14px;
  border-radius: 2px;
  transition: all 0.2s;
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 4px;
  left: 14px;
  right: 14px;
  height: 1px;
  background: var(--gold);
  transform: scaleX(0);
  transition: transform 0.3s var(--ease);
}

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

.nav-link:hover::after {
  transform: scaleX(1);
}

/* ── 5. Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 32px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.06em;
  border: 1px solid var(--sumi);
  background: transparent;
  color: var(--sumi);
  cursor: pointer;
  transition: all 0.35s var(--ease);
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--sumi);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.4s var(--ease);
  z-index: -1;
}

.btn:hover {
  color: #fff;
}

.btn:hover::before {
  transform: scaleX(1);
  transform-origin: left;
}

.btn.primary {
  background: var(--sumi);
  color: #fff;
  border-color: var(--sumi);
}

.btn.primary::before {
  background: var(--gold);
}

.btn.primary:hover {
  background: var(--gold);
  color: var(--sumi);
  border-color: var(--gold);
}

.btn.gold {
  border-color: var(--gold);
  color: var(--gold);
}

.btn.gold::before {
  background: var(--gold);
}

.btn.gold:hover {
  color: #fff;
}

.btn.small {
  padding: 8px 20px;
  font-size: 13px;
}

/* ── 6. Hero ── */
.hero-section {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: var(--kon);
  color: #fff;
  padding-top: 72px;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.6;
}

.hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(27, 42, 74, 0.4) 0%, rgba(27, 42, 74, 0.7) 50%, rgba(27, 42, 74, 0.95) 100%);
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
  padding: 80px 0;
}

.hero-kicker {
  display: inline-block;
  font-size: 12px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold);
  border: 1px solid var(--gold);
  padding: 8px 20px;
  margin-bottom: 32px;
}

.hero-title {
  font-family: var(--font-serif);
  font-size: clamp(36px, 5.5vw, 64px);
  font-weight: 900;
  line-height: 1.15;
  letter-spacing: 0.04em;
  margin: 0 0 28px;
}

.hero-lead {
  font-size: 18px;
  color: rgba(255, 255, 255, 0.75);
  max-width: 600px;
  margin: 0 auto 40px;
  line-height: 1.8;
}

.hero-cta {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.hero-cta .btn {
  border-color: rgba(255, 255, 255, 0.4);
  color: #fff;
}

.hero-cta .btn::before {
  background: var(--gold);
}

.hero-cta .btn:hover {
  color: var(--sumi);
  border-color: var(--gold);
}

.hero-cta .btn.primary {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--sumi);
}

.hero-cta .btn.primary::before {
  background: #fff;
}

.hero-tagline {
  margin-top: 48px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.45);
  letter-spacing: 0.1em;
}

/* Decorative line */
.hero-section .deco-line {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  width: 1px;
  height: 60px;
  background: linear-gradient(180deg, var(--gold), transparent);
  z-index: 1;
}

/* ── 7. Sections ── */
section {
  padding: var(--section-py) 0;
  position: relative;
}

.section-label {
  font-size: 11px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 700;
  margin-bottom: 12px;
  display: block;
}

.section-title {
  font-family: var(--font-serif);
  font-size: clamp(28px, 3.5vw, 42px);
  margin: 0 0 20px;
  position: relative;
}

.section-title::after {
  content: '';
  display: block;
  width: 40px;
  height: 2px;
  background: var(--gold);
  margin-top: 20px;
}

.section-title.center {
  text-align: center;
}

.section-title.center::after {
  margin-left: auto;
  margin-right: auto;
}

.section-sub {
  font-size: 17px;
  color: var(--text-sub);
  max-width: 65ch;
  line-height: 1.8;
}

/* ── 8. Image + Text Rows ── */
.row-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.row-split.reverse .row-image {
  order: -1;
}

.row-image {
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
}

.row-image img {
  width: 100%;
  display: block;
  transition: transform 0.6s var(--ease);
}

.row-image:hover img {
  transform: scale(1.03);
}

/* Decorative frame */
.row-image::before {
  content: '';
  position: absolute;
  top: -12px;
  left: -12px;
  right: 12px;
  bottom: 12px;
  border: 1px solid var(--gold);
  z-index: -1;
  opacity: 0.3;
}

/* ── 9. Cards ── */
.grid2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
}

.grid3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.card {
  background: var(--bg-surface);
  border: 1px solid rgba(0, 0, 0, 0.06);
  padding: 40px 32px;
  position: relative;
  overflow: hidden;
  transition: all 0.4s var(--ease);
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--gold), transparent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.5s var(--ease);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.08);
}

.card:hover::before {
  transform: scaleX(1);
}

.card-number {
  font-family: var(--font-serif);
  font-size: 48px;
  font-weight: 900;
  color: var(--kinari);
  line-height: 1;
  margin-bottom: 20px;
}

.card-title {
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 12px;
  letter-spacing: 0.02em;
}

.card-text {
  font-size: 15px;
  color: var(--text-sub);
  line-height: 1.8;
}

/* Coming Soon Card */
.card-coming-soon {
  border-style: dashed;
  border-color: var(--gold);
  position: relative;
  overflow: hidden;
}

.card-coming-soon::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(201, 169, 110, 0.06), transparent);
  animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
  0% {
    left: -100%;
  }

  100% {
    left: 200%;
  }
}

.coming-soon-badge .tag {
  animation: pulse-gold 2s ease-in-out infinite;
}

@keyframes pulse-gold {

  0%,
  100% {
    opacity: 0.7;
  }

  50% {
    opacity: 1;
  }
}

/* ── 10. Tags ── */
.tag {
  display: inline-flex;
  align-items: center;
  padding: 4px 14px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-sub);
  background: var(--kinari);
  border: 1px solid rgba(201, 169, 110, 0.2);
  letter-spacing: 0.04em;
}

.flex-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

/* ── 11. Dark Section ── */
.section-dark {
  background: var(--kon);
  color: #fff;
  position: relative;
  overflow: hidden;
}

.section-dark .section-title::after {
  background: var(--gold);
}

.section-dark .section-sub {
  color: rgba(255, 255, 255, 0.6);
}

.section-dark .card {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.08);
}

.section-dark .card:hover {
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.3);
}

.section-dark .card-text {
  color: rgba(255, 255, 255, 0.6);
}

.section-dark .card-number {
  color: rgba(255, 255, 255, 0.08);
}

/* ── 12. Accent Section ── */
.section-cream {
  background: var(--kinari);
}

/* ── 13. Timeline ── */
.timeline-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border-top: 2px solid var(--gold);
  margin-top: 48px;
}

.timeline-item {
  padding: 32px 24px 0;
  border-right: 1px solid rgba(0, 0, 0, 0.06);
  position: relative;
}

.timeline-item:last-child {
  border-right: none;
}

.timeline-item::before {
  content: '';
  position: absolute;
  top: -6px;
  left: 24px;
  width: 10px;
  height: 10px;
  background: var(--gold);
  border-radius: 50%;
}

.timeline-year {
  font-family: var(--font-serif);
  font-weight: 900;
  font-size: 22px;
  margin-bottom: 12px;
  color: var(--gold);
}

.timeline-desc {
  font-size: 14px;
  color: var(--text-sub);
  line-height: 1.7;
}

/* ── 14. Contact ── */
.contact-info {
  font-family: var(--font-mono);
  font-size: 13px;
  background: var(--kinari);
  padding: 24px;
  line-height: 2;
  white-space: pre-line;
}

/* ── 15. Footer ── */
footer {
  background: var(--sumi);
  color: rgba(255, 255, 255, 0.6);
  padding: 80px 0 40px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 60px;
}

.footer-brand-name {
  font-family: var(--font-serif);
  font-size: 18px;
  color: #fff;
  font-weight: 700;
  margin-bottom: 16px;
}

.footer-desc {
  font-size: 14px;
  line-height: 1.8;
  color: rgba(255, 255, 255, 0.45);
}

.footer-heading {
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 20px;
}

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

.footer-links a {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.55);
  transition: color 0.2s;
}

.footer-links a:hover {
  color: #fff;
}

.footer-bottom {
  margin-top: 60px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 13px;
  color: rgba(255, 255, 255, 0.3);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* ── 16. GDPR Cookie Consent Banner ── */
.cookie-banner {
  position: fixed;
  bottom: 24px;
  right: 24px;
  max-width: 420px;
  background: var(--bg-surface);
  border: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
  z-index: 1000;
  padding: 28px;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.4s var(--ease);
  pointer-events: none;
  border-radius: var(--radius);
}

.cookie-banner.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.cookie-text strong {
  display: block;
  font-family: var(--font-serif);
  margin-bottom: 8px;
  font-size: 16px;
}

.cookie-text p {
  margin: 0;
  font-size: 13px;
  color: var(--text-sub);
  line-height: 1.7;
}

.cookie-text a {
  text-decoration: underline;
  color: var(--gold);
}

.gdpr-categories {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.gdpr-option {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  padding: 10px 12px;
  background: var(--kinari);
  border-radius: var(--radius);
  transition: background 0.2s;
}

.gdpr-option:hover {
  background: rgba(201, 169, 110, 0.15);
}

.gdpr-option input[type="checkbox"] {
  margin-top: 3px;
  accent-color: var(--gold);
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.gdpr-label {
  font-size: 13px;
  line-height: 1.4;
  color: var(--text-main);
}

.gdpr-label strong {
  font-size: 13px;
  display: inline;
  margin: 0;
}

.gdpr-label small {
  color: var(--text-sub);
  font-size: 12px;
}

.cookie-actions {
  display: flex;
  gap: 8px;
  margin-top: 16px;
  flex-wrap: wrap;
}

.cookie-actions .btn {
  flex: 1;
  min-width: 0;
  padding: 10px 16px;
  font-size: 12px;
  white-space: nowrap;
}

/* GDPR footer link */
.gdpr-settings-link {
  cursor: pointer;
  color: rgba(255, 255, 255, 0.4);
  transition: color 0.2s;
  font-size: 13px;
}

.gdpr-settings-link:hover {
  color: var(--gold);
}

/* ── 17. Decorative Elements ── */
.deco-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  background: var(--gold);
  border-radius: 50%;
  margin: 0 8px;
  vertical-align: middle;
}

.divider {
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  margin: 0;
}

/* ── 18. Animations ── */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(32px);
  }

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

.animate {
  animation: fadeInUp 0.8s var(--ease) both;
}

.delay-1 {
  animation-delay: 0.1s;
}

.delay-2 {
  animation-delay: 0.2s;
}

.delay-3 {
  animation-delay: 0.3s;
}

.delay-4 {
  animation-delay: 0.4s;
}

/* ── 19. Responsive ── */
@media (max-width: 960px) {
  :root {
    --section-py: 80px;
  }

  .row-split {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .row-split.reverse .row-image {
    order: 0;
  }

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

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

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

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

  .nav-links {
    display: none;
  }

  .cookie-banner {
    left: 16px;
    right: 16px;
    max-width: none;
    bottom: 16px;
  }
}

@media (max-width: 640px) {
  .hero-content {
    padding: 60px 0;
  }

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

  .wrap {
    padding: 0 20px;
  }
}

/* ── 20. OSDog Dark Theme ── */
body.theme-osdog {
  --bg-body: #0b1020;
  --bg-surface: rgba(15, 23, 48, 0.6);
  --bg-accent: rgba(255, 255, 255, 0.03);
  --text-main: #eaf0ff;
  --text-sub: #93a4c7;
  --gold: #7aa7ff;
  --red: #61ffd7;

  background:
    radial-gradient(1000px 600px at 20% 0%, rgba(122, 167, 255, .12), transparent 60%),
    radial-gradient(900px 520px at 90% 10%, rgba(97, 255, 215, .06), transparent 55%),
    radial-gradient(900px 600px at 40% 100%, rgba(122, 167, 255, .06), transparent 60%),
    var(--bg-body);
}

body.theme-osdog .nav {
  background: rgba(11, 16, 32, 0.8);
  border-bottom-color: rgba(122, 167, 255, 0.08);
}

body.theme-osdog .card {
  background: rgba(15, 23, 48, 0.45);
  border-color: rgba(255, 255, 255, 0.06);
}

body.theme-osdog .card:hover {
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.4);
}

body.theme-osdog .tag {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(122, 167, 255, 0.15);
}

body.theme-osdog .codebox {
  background: rgba(0, 0, 0, 0.4);
  color: #dbe6ff;
  border-color: rgba(255, 255, 255, 0.06);
}

body.theme-osdog .btn.primary {
  background: linear-gradient(135deg, rgba(122, 167, 255, .95), rgba(97, 255, 215, .82));
  color: #0b1020;
  border: none;
}

/* ── 21. Utility Pages ── */
.page-simple .wrap {
  max-width: 800px;
  padding-top: 120px;
  padding-bottom: 60px;
}

.page-simple h1 {
  font-family: var(--font-serif);
  font-size: 32px;
  margin-bottom: 32px;
}

.page-simple h1::after {
  content: '';
  display: block;
  width: 40px;
  height: 2px;
  background: var(--gold);
  margin-top: 16px;
}

.page-simple h2 {
  font-size: 18px;
  margin: 32px 0 12px;
}

.page-simple p,
.page-simple li {
  color: var(--text-sub);
  line-height: 1.8;
}

.page-simple .policy-card {
  background: var(--bg-surface);
  border: 1px solid rgba(0, 0, 0, 0.06);
  padding: 48px 40px;
}

.page-simple .top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 48px;
  flex-wrap: wrap;
  gap: 16px;
}

.page-simple .top-links {
  display: flex;
  gap: 12px;
}

/* ── 22. Codebox ── */
.codebox {
  font-family: var(--font-mono);
  font-size: 13px;
  background: var(--kinari);
  border: 1px solid rgba(0, 0, 0, 0.06);
  padding: 24px;
  overflow-x: auto;
  white-space: pre;
  line-height: 1.6;
}

/* ── 23. Verify Form ── */
.form-row {
  display: flex;
  gap: 12px;
}

input[type="text"],
input[type="email"] {
  flex: 1;
  padding: 14px 18px;
  font-size: 16px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  background: var(--bg-surface);
  color: var(--text-main);
  font-family: var(--font-sans);
  transition: border-color 0.2s;
}

input:focus {
  outline: none;
  border-color: var(--gold);
}