/* ==========================================================================
   Singapore Business Directory — stylesheet
   Palette: Singapore red + white, clean modern directory look
   ========================================================================== */

:root {
  --red: #D7263D;
  --red-dark: #B01C30;
  --red-soft: #FDECEF;
  --ink: #14171F;
  --body: #4A5162;
  --muted: #7A8194;
  --line: #E5E8EF;
  --tint: #F7F8FB;
  --white: #FFFFFF;
  --green: #12805C;

  --radius: 14px;
  --radius-sm: 9px;
  --shadow-sm: 0 1px 2px rgba(20, 23, 31, .06), 0 1px 3px rgba(20, 23, 31, .05);
  --shadow-md: 0 6px 18px rgba(20, 23, 31, .07);
  --shadow-lg: 0 18px 40px rgba(20, 23, 31, .10);
  --max: 1160px;
}

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

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

body {
  margin: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
  color: var(--body);
  background: var(--white);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { color: var(--ink); line-height: 1.2; margin: 0 0 .5em; font-weight: 700; letter-spacing: -.02em; }
h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); font-weight: 800; }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); }
h3 { font-size: 1.05rem; }
p  { margin: 0 0 1rem; }
img { max-width: 100%; display: block; }
a { color: var(--red); text-decoration: none; }
a:hover { text-decoration: underline; }
ul, ol { margin: 0; padding: 0; list-style: none; }

.container { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: 20px; }
.container--narrow { max-width: 780px; }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 999;
  background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 0 0 var(--radius-sm) 0;
}
.skip-link:focus { left: 0; }

:focus-visible { outline: 3px solid rgba(215, 38, 61, .45); outline-offset: 2px; border-radius: 4px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  font-weight: 600; font-size: .95rem; line-height: 1;
  padding: .85rem 1.4rem; border-radius: var(--radius-sm);
  border: 1px solid transparent; cursor: pointer; white-space: nowrap;
  transition: background .16s ease, color .16s ease, border-color .16s ease, transform .16s ease;
  text-decoration: none;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-sm { padding: .55rem .9rem; font-size: .85rem; }
.btn-lg { padding: 1rem 1.7rem; font-size: 1rem; }

.btn-primary { background: var(--red); color: #fff; }
.btn-primary:hover { background: var(--red-dark); color: #fff; }

.btn-outline { background: transparent; color: #fff; border-color: rgba(255,255,255,.55); }
.btn-outline:hover { background: rgba(255,255,255,.12); color: #fff; }

.btn-ghost { background: var(--white); color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--red); color: var(--red); }

.btn-link { background: transparent; color: var(--muted); padding-inline: .4rem; }
.btn-link:hover { color: var(--red); }

/* ---------- under-development banner ---------- */
.dev-banner {
  background: var(--ink);
  color: rgba(255,255,255,.86);
  font-size: .86rem;
  border-bottom: 3px solid var(--red);
}
.dev-banner-inner {
  display: flex; align-items: center; justify-content: center;
  gap: .7rem; padding-block: .6rem; text-align: center; flex-wrap: wrap;
}
.dev-chip {
  flex: none; font-size: .68rem; font-weight: 800; letter-spacing: .09em;
  text-transform: uppercase; color: #fff; background: var(--red);
  border-radius: 999px; padding: .22rem .65rem;
}
.dev-text { color: rgba(255,255,255,.8); }

/* dev hero extras */
.hero--dev .hero-inner { padding-bottom: clamp(2rem, 5vw, 3rem); }
.eyebrow--dev { display: inline-flex; align-items: center; gap: .5rem; }
.eyebrow--dev .dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--red);
  box-shadow: 0 0 0 4px rgba(215,38,61,.18);
}
.dev-note {
  max-width: 640px; margin: 0 auto 1.8rem; text-align: left;
  background: var(--white); border: 1px solid var(--line);
  border-left: 4px solid var(--red);
  border-radius: var(--radius-sm); padding: 1.1rem 1.25rem;
  box-shadow: var(--shadow-sm);
}
.dev-note p { margin: 0; font-size: .95rem; line-height: 1.8; }
.dev-note strong { color: var(--ink); }

.hero-actions { display: flex; flex-wrap: wrap; gap: .7rem; justify-content: center; margin: 0; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 60;
  background: rgba(255,255,255,.94);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 68px; }

.brand { display: inline-flex; align-items: center; gap: .65rem; color: var(--ink); }
.brand:hover { text-decoration: none; }
.brand-mark {
  width: 38px; height: 38px; flex: 0 0 38px; border-radius: 10px;
  background: var(--red); color: #fff;
  display: grid; place-items: center; font-weight: 800; font-size: .9rem; letter-spacing: .02em;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-text strong { font-size: 1rem; font-weight: 800; letter-spacing: -.01em; }
.brand-text span { font-size: .74rem; color: var(--muted); letter-spacing: .06em; text-transform: uppercase; }

.primary-nav ul { display: flex; align-items: center; gap: .3rem; }
.primary-nav a {
  display: block; padding: .55rem .8rem; border-radius: var(--radius-sm);
  color: var(--body); font-size: .93rem; font-weight: 500;
}
.primary-nav a:hover { background: var(--tint); color: var(--ink); text-decoration: none; }
.nav-cta { margin-left: .4rem; }
.primary-nav .nav-cta a { background: var(--red); color: #fff; font-weight: 600; }
.primary-nav .nav-cta a:hover { background: var(--red-dark); color: #fff; }

.nav-toggle {
  display: none; width: 42px; height: 42px; border: 1px solid var(--line);
  border-radius: var(--radius-sm); background: var(--white); cursor: pointer;
  padding: 11px 10px; flex-direction: column; justify-content: space-between;
}
.nav-toggle span { display: block; height: 2px; background: var(--ink); border-radius: 2px; transition: transform .2s ease, opacity .2s ease; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(9px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- hero ---------- */
.hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(900px 420px at 80% -10%, var(--red-soft), transparent 70%),
    linear-gradient(180deg, #fff 0%, var(--tint) 100%);
  border-bottom: 1px solid var(--line);
}
.hero-inner { padding: clamp(3rem, 8vw, 5.5rem) 20px clamp(2.5rem, 6vw, 4rem); text-align: center; }

.eyebrow {
  display: inline-block; font-size: .78rem; font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase; color: var(--red);
  background: var(--red-soft); border: 1px solid rgba(215,38,61,.16);
  padding: .4rem .85rem; border-radius: 999px; margin-bottom: 1.2rem;
}
.hero h1 { margin-bottom: .6rem; }
.accent { color: var(--red); }
.hero-sub { max-width: 620px; margin: 0 auto 2rem; font-size: clamp(1rem, 2vw, 1.13rem); color: var(--body); }

/* search form */
.search-form {
  display: grid;
  grid-template-columns: 1.5fr 1fr auto;
  gap: .6rem; align-items: end;
  max-width: 860px; margin: 0 auto;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: .8rem;
  text-align: left;
}
.field { display: flex; flex-direction: column; gap: .25rem; min-width: 0; }
.field label { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding-left: .6rem; }
.field input, .field select {
  width: 100%; font: inherit; font-size: .98rem; color: var(--ink);
  border: 1px solid transparent; background: var(--tint);
  border-radius: var(--radius-sm); padding: .8rem .9rem;
}
.field input:focus, .field select:focus { background: #fff; border-color: var(--red); outline: none; }
.btn-search { height: 48px; }

.hero-tags { margin-top: 1.4rem; font-size: .9rem; color: var(--muted); }
.hero-tags a { color: var(--body); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line); margin-inline: .15rem; }
.hero-tags a:hover { color: var(--red); text-decoration-color: var(--red); }

/* ---------- stats ---------- */
.stats { background: var(--ink); color: #fff; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; padding-block: 1.9rem; text-align: center; }
.stat { display: flex; flex-direction: column; gap: .2rem; }
.stat-value { font-size: clamp(1.4rem, 3vw, 1.9rem); font-weight: 800; color: #fff; letter-spacing: -.02em; }
.stat-label { font-size: .82rem; color: rgba(255,255,255,.66); letter-spacing: .02em; }

/* ---------- section shell ---------- */
.section { padding-block: clamp(3rem, 7vw, 4.6rem); }
.section--tint { background: var(--tint); border-block: 1px solid var(--line); }

.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-bottom: 2rem; flex-wrap: wrap; }
.section-head--center { justify-content: center; text-align: center; }
.section-head h2 { margin-bottom: .25rem; }
.section-sub { margin: 0; color: var(--muted); }
.link-more { font-weight: 600; font-size: .92rem; white-space: nowrap; }

/* ---------- categories ---------- */
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 1rem; }
.cat-card {
  display: flex; flex-direction: column; gap: .35rem; height: 100%;
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.25rem 1.15rem; box-shadow: var(--shadow-sm);
  transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}
.cat-card:hover { border-color: rgba(215,38,61,.4); box-shadow: var(--shadow-md); transform: translateY(-2px); text-decoration: none; }
.cat-icon { font-size: 1.6rem; line-height: 1; }
.cat-name { font-weight: 600; color: var(--ink); font-size: .98rem; }
.cat-count { font-size: .8rem; color: var(--muted); }

/* non-clickable category tile used while the site is under development */
.cat-card--static { cursor: default; }
.cat-card--static:hover { border-color: var(--line); box-shadow: var(--shadow-sm); transform: none; }
.cat-soon {
  margin-top: auto; padding-top: .5rem;
  font-size: .72rem; font-weight: 700; letter-spacing: .05em;
  text-transform: uppercase; color: var(--muted);
}
.cat-footnote { margin: 1.8rem 0 0; text-align: center; font-size: .92rem; color: var(--muted); }

/* ---------- listings ---------- */
.listing-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 1.1rem; }
.listing-card {
  display: flex; flex-direction: column; height: 100%;
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.3rem; box-shadow: var(--shadow-sm);
  transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}
.listing-card:hover { border-color: rgba(215,38,61,.35); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.listing-top { display: flex; align-items: flex-start; gap: .85rem; margin-bottom: .8rem; }
.listing-logo {
  width: 46px; height: 46px; flex: 0 0 46px; border-radius: 12px;
  background: var(--red-soft); color: var(--red);
  display: grid; place-items: center; font-weight: 800; font-size: .95rem;
}
.listing-name { margin: 0 0 .35rem; font-size: 1.03rem; }
.listing-name a { color: var(--ink); }
.listing-name a:hover { color: var(--red); text-decoration: none; }
.listing-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .45rem; margin: 0; font-size: .82rem; color: var(--muted); }
.pill { background: var(--tint); border: 1px solid var(--line); border-radius: 999px; padding: .15rem .55rem; color: var(--body); }
.badge-verified {
  margin-left: auto; flex: none; font-size: .72rem; font-weight: 700;
  color: var(--green); background: rgba(18,128,92,.09);
  border: 1px solid rgba(18,128,92,.2); border-radius: 999px; padding: .2rem .55rem;
}
.listing-blurb { font-size: .92rem; margin-bottom: 1.1rem; }
.listing-actions { display: flex; align-items: center; gap: .5rem; margin-top: auto; }

/* ---------- steps ---------- */
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.4rem; counter-reset: step; }
.step { position: relative; padding: 1.6rem 1.4rem; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); text-align: center; }
.step-num {
  display: grid; place-items: center; width: 40px; height: 40px; margin: 0 auto .9rem;
  border-radius: 50%; background: var(--red); color: #fff; font-weight: 800;
}
.step p { margin: 0; font-size: .93rem; }

/* ---------- CTA ---------- */
.cta { background: linear-gradient(135deg, var(--red) 0%, #A8172B 100%); color: #fff; padding-block: clamp(3rem, 7vw, 4.4rem); }
.cta-inner { display: grid; grid-template-columns: 1.2fr .8fr; gap: 2.4rem; align-items: center; }
.cta h2 { color: #fff; }
.cta p { color: rgba(255,255,255,.9); }
.cta-points { display: grid; gap: .45rem; margin-top: 1rem; }
.cta-points li { position: relative; padding-left: 1.6rem; color: rgba(255,255,255,.92); font-size: .95rem; }
.cta-points li::before { content: "✔"; position: absolute; left: 0; top: 0; color: #fff; font-size: .9rem; }
.cta-action { display: flex; flex-direction: column; gap: .7rem; align-items: stretch; }
.cta-note { margin: .4rem 0 0; font-size: .85rem; color: rgba(255,255,255,.85); }
.cta-note a { color: #fff; text-decoration: underline; }

/* ---------- FAQ ---------- */
.faq { display: grid; gap: .7rem; }
.faq-item { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; }
.faq-item summary {
  cursor: pointer; list-style: none; padding: 1.05rem 3rem 1.05rem 1.2rem;
  font-weight: 600; color: var(--ink); position: relative;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+"; position: absolute; right: 1.1rem; top: 50%; transform: translateY(-50%);
  font-size: 1.35rem; font-weight: 400; color: var(--red); line-height: 1;
}
.faq-item[open] summary::after { content: "–"; }
.faq-item[open] summary { border-bottom: 1px solid var(--line); }
.faq-answer { padding: 1rem 1.2rem 1.1rem; }
.faq-answer p { margin: 0; font-size: .95rem; }

/* ---------- footer ---------- */
.site-footer { background: var(--ink); color: rgba(255,255,255,.72); padding-top: 3.2rem; }
.footer-grid { display: grid; grid-template-columns: 1.7fr 1fr 1fr 1fr; gap: 2rem; padding-bottom: 2.4rem; }
.site-footer .brand--footer,
.site-footer .brand--footer .brand-text strong { color: #fff; }
.site-footer .brand--footer .brand-text span { color: rgba(255,255,255,.55); }
.footer-blurb { margin-top: 1rem; font-size: .9rem; max-width: 34ch; color: rgba(255,255,255,.66); }
.footer-col h3 { color: #fff; font-size: .82rem; text-transform: uppercase; letter-spacing: .08em; margin-bottom: .9rem; }
.footer-col ul { display: grid; gap: .5rem; }
.footer-col a, .social a { color: rgba(255,255,255,.72); font-size: .92rem; }
.footer-col a:hover, .social a:hover { color: #fff; }
.footer-soon li { color: rgba(255,255,255,.45); font-size: .92rem; }
.footer-soon li::after { content: " · soon"; color: rgba(255,255,255,.3); font-size: .8rem; }
.social { display: flex; gap: 1rem; margin-top: 1rem; font-size: .9rem; }
.footer-bottom {
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: .5rem;
  border-top: 1px solid rgba(255,255,255,.12); padding-block: 1.3rem; font-size: .85rem;
}
.footer-bottom p { margin: 0; }
.footer-bottom a { color: rgba(255,255,255,.72); }

/* ---------- responsive ---------- */
@media (max-width: 960px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .cta-inner { grid-template-columns: 1fr; }
}

@media (max-width: 820px) {
  .nav-toggle { display: flex; }
  .primary-nav {
    position: absolute; left: 0; right: 0; top: 100%;
    background: #fff; border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-md);
    display: none; padding: .6rem 20px 1rem;
  }
  .primary-nav.is-open { display: block; }
  .primary-nav ul { flex-direction: column; align-items: stretch; gap: .1rem; }
  .primary-nav a { padding: .8rem .6rem; }
  .nav-cta { margin: .5rem 0 0; }
  .nav-cta a { justify-content: center; padding: .8rem; }

  .search-form { grid-template-columns: 1fr; }
  .btn-search { width: 100%; height: 50px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 1.4rem; }
  .section-head { flex-direction: column; align-items: flex-start; }
  .section-head--center { align-items: center; }
}

@media (max-width: 560px) {
  .cat-grid { grid-template-columns: repeat(2, 1fr); }
  .dev-banner-inner { gap: .45rem; font-size: .82rem; }
  .hero-actions .btn { width: 100%; }
  .listing-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
}

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