/*
  Dubir Group Co., Ltd — Single-page landing styles (Light "bookstore" theme)
  Mobile-first, readable, airy, and accessible.
*/

:root {
  /* Palette: paper, ink, and a gentle accent */
  --bg: #faf7f2;         /* paper */
  --panel: #ffffff;      /* panels/cards */
  --ink: #1f2937;        /* primary text (ink) */
  --text: var(--ink);
  --muted: #66676e;      /* secondary text */
  --brand: #2a7f62;      /* accent (teal) */
  --brand-2: #b8792e;    /* warm bookmark accent */
  --card: #ffffff;
  --border: #e7e1d8;     /* soft divider */
  --shadow: 0 8px 20px rgba(0,0,0,.06);
  --radius: 12px;
  --space-1: .25rem;
  --space-2: .5rem;
  --space-3: .75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;
  --space-8: 4rem;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji","Segoe UI Emoji", sans-serif;
  color: var(--text);
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(186, 230, 201, .18), transparent 60%),
    radial-gradient(1000px 500px at 110% 10%, rgba(250, 204, 171, .16), transparent 55%),
    var(--bg);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

.container {
  width: min(1040px, 92vw);
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px; height: 1px;
  overflow: hidden;
}
.skip-link:focus {
  left: 1rem; top: 1rem; width: auto; height: auto; padding: .5rem .75rem;
  background: #000; color: #fff; border-radius: .5rem; z-index: 1000;
}

.site-header {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: saturate(120%) blur(6px);
  background: color-mix(in oklab, #ffffff 80%, transparent);
  border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; padding: var(--space-4) 0; }
.logo { img { height: auto } }
.nav { display: flex; gap: var(--space-5); }
.nav a { color: var(--muted); text-decoration: none; font-weight: 600; }
.nav a:hover, .nav a:focus { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }

.hero {
  position: relative;
  padding: var(--space-8) 0 var(--space-7);
  overflow: clip;
}
.hero .container { position: relative; z-index: 1; }
.hero-bg {
  position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background:
    /* Soft white overlay to ensure readable text */
    linear-gradient(90deg, rgba(0, 0, 0, 0.8), rgba(0,0,0,0.1)),
    /* Specialization-themed image: macro circuit board texture (electronics/components) */
    url("./../img/shop.jpg"),
    /* Keep subtle brand tints for the bookish vibe */
    radial-gradient(900px 480px at 80% 10%, rgba(42,127,98,.10), transparent 60%),
    radial-gradient(800px 400px at 15% 25%, rgba(184,121,46,.08), transparent 55%),
    linear-gradient(180deg, rgba(255,255,255,.5), rgba(255,255,255,0));
  background-size: cover, cover, auto, auto, auto;
  background-position: center, center, 80% 10%, 15% 25%, center;
  background-repeat: no-repeat;
}

h1, h2, h3 { line-height: 1.25; margin: 0 0 var(--space-4); color: var(--ink); }

/* Bookish headings: serif for titles */
:where(h1,h2,h3) { font-family: "Merriweather", Georgia, Cambria, "Times New Roman", Times, serif; }

h1 { font-size: clamp(2rem, 5vw, 3rem); font-weight: 800; letter-spacing: -0.01em; width: 60%; }
#hero-title { color: #eddfdf !important; }
.lead { font-size: clamp(1.05rem, 2.4vw, 1.25rem); color: #cdcccc; max-width: 45%; }

.hero-cta { display: flex; gap: var(--space-4); margin-top: var(--space-6); flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: .8rem 1.05rem; border-radius: .6rem; text-decoration: none;
  font-weight: 700; border: 1px solid transparent; transition: transform .15s ease, box-shadow .15s ease, background-color .15s ease, color .15s ease;
}
.btn.primary { background: var(--brand); color: #ffffff; box-shadow: 0 6px 16px rgba(42,127,98,.22); }
.btn.primary:hover { filter: brightness(1.03); transform: translateY(-1px); }
.btn.secondary { background: transparent; border-color: var(--border); color: var(--ink); }
.btn.secondary:hover { border-color: color-mix(in oklab, var(--brand) 35%, var(--border)); transform: translateY(-1px); }

.section { padding: var(--space-8) 0; }
.section.alt { background: #fffdf8; border-block: 1px solid var(--border); }
.section-title { font-size: clamp(1.4rem, 3.2vw, 2rem); font-weight: 900; letter-spacing: .1px; margin-bottom: var(--space-6); position: relative; }
.section-title::after {
  content: ""; display: block; width: 64px; height: 2px; background: linear-gradient(90deg, var(--brand), color-mix(in oklab, var(--brand) 20%, var(--brand-2))); margin-top: .6rem; border-radius: 2px;
}

.cards {
  display: grid; gap: var(--space-5);
  grid-template-columns: 1fr;
}
@media (min-width: 640px) { .cards { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .cards { grid-template-columns: repeat(4, 1fr); } }

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-6);
  box-shadow: var(--shadow);
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.card:hover, .card:focus-within {
  transform: translateY(-2px);
  border-color: color-mix(in oklab, var(--brand) 30%, var(--border));
  box-shadow: 0 10px 22px rgba(0,0,0,.08);
}
.card h3 { margin-bottom: var(--space-3); font-size: 1.1rem; }
.card p { color: var(--muted); margin: 0; }

.prose { color: var(--muted); font-size: 1.02rem; }
.prose p { margin: 0 0 var(--space-4); }

.contact-card {
  margin-top: var(--space-6);
  display: grid; gap: var(--space-4);
  grid-template-columns: 1fr;
}
@media (min-width: 680px) { .contact-card { grid-template-columns: repeat(3, 1fr); } }

.contact-item { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: var(--space-5); }
.contact-label { color: var(--muted); font-size: .82rem; text-transform: uppercase; letter-spacing: .08em; margin-bottom: .25rem; }
.contact-value a { color: var(--ink); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.contact-value a:hover { color: var(--brand); text-decoration-thickness: 2px; }

.site-footer { border-top: 1px solid var(--border); background: #fff; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); padding: var(--space-5) 0; }
.to-top { color: var(--muted); text-decoration: none; border: 1px solid var(--border); padding: .35rem .6rem; border-radius: .5rem; }
.to-top:hover { color: var(--ink); border-color: var(--brand); }

/* Links in content */
a { color: var(--brand); }
a:hover { filter: brightness(0.95); }

/* Focus outline for accessibility */
:focus-visible {
  outline: 2px solid color-mix(in oklab, var(--brand) 70%, white);
  outline-offset: 3px;
  border-radius: 6px;
}

/* Motion preferences */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* Print-friendly basics */
@media print {
  .site-header, .hero-cta, .hero-bg, .to-top { display: none !important; }
  body { background: #fff; color: #000; }
  .section, .hero { padding: 1rem 0; }
  a { color: #000; text-decoration: underline; }
}

/* Map embed styles */
.map-block { margin-top: var(--space-6); }
.map-block h3 { margin-bottom: var(--space-3); font-size: 1.1rem; }
.map-embed { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.map-embed iframe { width: 100%; height: 360px; border: 0; display: block; aspect-ratio: 16 / 9; }
.map-link { margin-top: var(--space-2); }
.map-link a { color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }
.map-link a:hover { color: var(--brand); }

@media (min-width: 960px) {
  .map-embed iframe { height: 420px; }
}

@media print {
  .map-block { display: none !important; }
}

/*
  Dubir Group Co., Ltd — Single-page landing styles (Light "bookstore" theme)
  Mobile-first, readable, airy, and accessible.
*/

:root {
  /* Palette: paper, ink, and a gentle accent */
  --bg: #faf7f2;         /* paper */
  --panel: #ffffff;      /* panels/cards */
  --ink: #1f2937;        /* primary text (ink) */
  --text: var(--ink);
  --muted: #66676e;      /* secondary text */
  --brand: #2a7f62;      /* accent (teal) */
  --brand-2: #b8792e;    /* warm bookmark accent */
  --card: #ffffff;
  --border: #e7e1d8;     /* soft divider */
  --shadow: 0 8px 20px rgba(0,0,0,.06);
  --radius: 12px;
  --space-1: .25rem;
  --space-2: .5rem;
  --space-3: .75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;
  --space-8: 4rem;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji","Segoe UI Emoji", sans-serif;
  color: var(--text);
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(186, 230, 201, .18), transparent 60%),
    radial-gradient(1000px 500px at 110% 10%, rgba(250, 204, 171, .16), transparent 55%),
    var(--bg);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

.container {
  width: min(1040px, 92vw);
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px; height: 1px;
  overflow: hidden;
}
.skip-link:focus {
  left: 1rem; top: 1rem; width: auto; height: auto; padding: .5rem .75rem;
  background: #000; color: #fff; border-radius: .5rem; z-index: 1000;
}

.site-header {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: saturate(120%) blur(6px);
  background: color-mix(in oklab, #ffffff 80%, transparent);
  border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; padding: var(--space-4) 0; position: relative; }
.logo { img { height: auto } }
.nav { display: flex; gap: var(--space-5); }
.nav a { color: var(--muted); text-decoration: none; font-weight: 600; }
.nav a:hover, .nav a:focus { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }

/* Mobile menu toggle button */
.menu-toggle {
  display: none; /* shown on small screens */
  align-items: center; justify-content: center;
  padding: .5rem; border-radius: .6rem; border: 1px solid var(--border);
  background: var(--panel); cursor: pointer;
}
.menu-toggle__bar { display: block; width: 22px; height: 2px; background: var(--ink); margin: 4px 0; transition: transform .2s ease, opacity .2s ease, background-color .2s ease; }
.menu-toggle:hover { border-color: color-mix(in oklab, var(--brand) 35%, var(--border)); }
.menu-toggle:focus-visible { outline: 2px solid color-mix(in oklab, var(--brand) 70%, white); outline-offset: 3px; }
/* Animated hamburger to X */
.menu-toggle[aria-expanded="true"] .menu-toggle__bar:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] .menu-toggle__bar:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] .menu-toggle__bar:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* Hero */
.hero {
  position: relative;
  padding: var(--space-8) 0 var(--space-7);
  overflow: clip;
}
.hero .container { position: relative; z-index: 1; }
.hero-bg {
  position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background:
    /* Soft white overlay to ensure readable text */
    linear-gradient(90deg, rgba(0, 0, 0, 0.8), rgba(0,0,0,0.1)),
    /* Specialization-themed image: macro circuit board texture (electronics/components) */
    url("./../img/shop.jpg"),
    /* Keep subtle brand tints for the bookish vibe */
    radial-gradient(900px 480px at 80% 10%, rgba(42,127,98,.10), transparent 60%),
    radial-gradient(800px 400px at 15% 25%, rgba(184,121,46,.08), transparent 55%),
    linear-gradient(180deg, rgba(255,255,255,.5), rgba(255,255,255,0));
  background-size: cover, cover, auto, auto, auto;
  background-position: center, center, 80% 10%, 15% 25%, center;
  background-repeat: no-repeat;
}

h1, h2, h3 { line-height: 1.25; margin: 0 0 var(--space-4); color: var(--ink); }

/* Bookish headings: serif for titles */
:where(h1,h2,h3) { font-family: "Merriweather", Georgia, Cambria, "Times New Roman", Times, serif; }

h1 { font-size: clamp(2rem, 5vw, 3rem); font-weight: 800; letter-spacing: -0.01em; width: 60%; }
#hero-title { color: #eddfdf !important; }
.lead { font-size: clamp(1.05rem, 2.4vw, 1.25rem); color: #cdcccc; max-width: 45%; }

.hero-cta { display: flex; gap: var(--space-4); margin-top: var(--space-6); flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: .8rem 1.05rem; border-radius: .6rem; text-decoration: none;
  font-weight: 700; border: 1px solid transparent; transition: transform .15s ease, box-shadow .15s ease, background-color .15s ease, color .15s ease;
}
.btn.primary { background: var(--brand); color: #ffffff; box-shadow: 0 6px 16px rgba(42,127,98,.22); }
.btn.primary:hover { filter: brightness(1.03); transform: translateY(-1px); }
.btn.secondary { background: transparent; border-color: var(--border); color: #ffffff; }
.btn.secondary:hover { border-color: color-mix(in oklab, var(--brand) 35%, var(--border)); transform: translateY(-1px); }

.section { padding: var(--space-8) 0; }
.section.alt { background: #fffdf8; border-block: 1px solid var(--border); }
.section-title { font-size: clamp(1.4rem, 3.2vw, 2rem); font-weight: 900; letter-spacing: .1px; margin-bottom: var(--space-6); position: relative; }
.section-title::after {
  content: ""; display: block; width: 64px; height: 2px; background: linear-gradient(90deg, var(--brand), color-mix(in oklab, var(--brand) 20%, var(--brand-2))); margin-top: .6rem; border-radius: 2px;
}

.cards {
  display: grid; gap: var(--space-5);
  grid-template-columns: 1fr;
}
@media (min-width: 640px) { .cards { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .cards { grid-template-columns: repeat(4, 1fr); } }

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-6);
  box-shadow: var(--shadow);
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.card:hover, .card:focus-within {
  transform: translateY(-2px);
  border-color: color-mix(in oklab, var(--brand) 30%, var(--border));
  box-shadow: 0 10px 22px rgba(0,0,0,.08);
}
.card h3 { margin-bottom: var(--space-3); font-size: 1.1rem; }
.card p { color: var(--muted); margin: 0; }

.prose { color: var(--muted); font-size: 1.02rem; }
.prose p { margin: 0 0 var(--space-4); }

.contact-card {
  margin-top: var(--space-6);
  display: grid; gap: var(--space-4);
  grid-template-columns: 1fr;
}
@media (min-width: 680px) { .contact-card { grid-template-columns: repeat(3, 1fr); } }

.contact-item { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: var(--space-5); }
.contact-label { color: var(--muted); font-size: .82rem; text-transform: uppercase; letter-spacing: .08em; margin-bottom: .25rem; }
.contact-value a { color: var(--ink); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.contact-value a:hover { color: var(--brand); text-decoration-thickness: 2px; }

.site-footer { border-top: 1px solid var(--border); background: #fff; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); padding: var(--space-5) 0; }
.to-top { color: var(--muted); text-decoration: none; border: 1px solid var(--border); padding: .35rem .6rem; border-radius: .5rem; }
.to-top:hover { color: var(--ink); border-color: var(--brand); }

/* Links in content */
a { color: var(--brand); }
a:hover { filter: brightness(0.95); }

/* Focus outline for accessibility */
:focus-visible {
  outline: 2px solid color-mix(in oklab, var(--brand) 70%, white);
  outline-offset: 3px;
  border-radius: 6px;
}

/* Motion preferences */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* Print-friendly basics */
@media print {
  .site-header, .hero-cta, .hero-bg, .to-top { display: none !important; }
  body { background: #fff; color: #000; }
  .section, .hero { padding: 1rem 0; }
  a { color: #000; text-decoration: underline; }
}

/* Map embed styles */
.map-block { margin-top: var(--space-6); }
.map-block h3 { margin-bottom: var(--space-3); font-size: 1.1rem; }
.map-embed { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.map-embed iframe { width: 100%; height: 360px; border: 0; display: block; aspect-ratio: 16 / 9; }
.map-link { margin-top: var(--space-2); }
.map-link a { color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }
.map-link a:hover { color: var(--brand); }

@media (min-width: 960px) {
  .map-embed iframe { height: 420px; }
}

@media print {
  .map-block { display: none !important; }
}

/* Mobile navigation layout */
@media (max-width: 767px) {
  .menu-toggle { display: inline-flex; }
  /* Turn the nav into a dropdown panel */
  .site-header .nav {
    position: absolute; top: 100%; right: 0; left: 0;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: var(--space-4);
    display: none;
    flex-direction: column;
    gap: var(--space-3);
    z-index: 60;
  }
  .site-header .nav.open { display: flex; }
  .site-header .nav a { padding: .25rem 0; color: var(--ink); }
}

/* Desktop restores inline nav and hides the toggle */
@media (min-width: 768px) {
  .menu-toggle { display: none !important; }
  .site-header .nav {
    display: flex !important; position: static; background: transparent; border: 0; box-shadow: none; padding: 0; flex-direction: row; gap: var(--space-5);
  }
}

/* ---- Fix: correct logo sizing and align hamburger bars ---- */
/* Ensure the logo image sizing applies (previous SCSS-like nesting was invalid in plain CSS) */
.logo img { height: 4rem; display: block; }

/* Normalize hamburger button size and center bars precisely */
.menu-toggle { width: 44px; height: 44px; padding: 0; position: relative; align-items: center; justify-content: center; }
.menu-toggle__bar {
  position: absolute;
  left: 50%;
  width: 22px;
  height: 2px;
  background: var(--ink);
  transform: translateX(-50%);
  transition: transform .2s ease, opacity .2s ease, top .2s ease, background-color .2s ease;
  margin: 0;
}
.menu-toggle__bar:nth-child(1) { top: 14px; }
.menu-toggle__bar:nth-child(2) { top: 21px; }
.menu-toggle__bar:nth-child(3) { top: 28px; }

/* Open state: morph into a centered X */
.menu-toggle[aria-expanded="true"] .menu-toggle__bar:nth-child(1) { top: 21px; transform: translateX(-50%) rotate(45deg); }
.menu-toggle[aria-expanded="true"] .menu-toggle__bar:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] .menu-toggle__bar:nth-child(3) { top: 21px; transform: translateX(-50%) rotate(-45deg); }
