/* ============================================
   safa-lang ─ portal page styles
   ============================================ */

:root {
  --color-primary: #2F75F2;
  --color-primary-dark: #1F5BCC;
  --color-primary-light: #EAF2FE;
  --color-accent-teal: #14B8A6;
  --color-accent-warm: #F59E0B;
  --color-text: #1A1A1A;
  --color-text-muted: #6B7280;
  --color-text-subtle: #9CA3AF;
  --color-bg: #FFFFFF;
  --color-bg-soft: #FAFAFA;
  --color-bg-mute: #F5F7FA;
  --color-border: #E5E7EB;
  --color-border-soft: #F0F2F5;

  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 4px 16px rgba(15, 23, 42, 0.06);
  --shadow-lg: 0 16px 48px rgba(15, 23, 42, 0.08);

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 24px;
  --radius-xl: 32px;

  --max-width: 1180px;

  --font-jp: "Noto Sans JP", "Hiragino Sans", "Yu Gothic", system-ui, sans-serif;
  --font-en: "Inter", system-ui, -apple-system, sans-serif;
  --font-deva: "Noto Sans Devanagari", "Noto Sans JP", sans-serif;
  --font-kr: "Noto Sans KR", "Noto Sans JP", sans-serif;
}

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

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

body {
  margin: 0;
  font-family: var(--font-jp);
  font-feature-settings: "palt";
  color: var(--color-text);
  background-color: var(--color-bg);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover { color: var(--color-primary-dark); }

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

/* ---------- Layout helpers ---------- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 112px 0;
}

.section--soft { background-color: var(--color-bg-soft); }
.section--mute { background-color: var(--color-bg-mute); }

.section-header {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 64px;
}

.section-eyebrow {
  font-family: var(--font-en);
  font-size: 13px;
  letter-spacing: 0.14em;
  color: var(--color-primary);
  text-transform: uppercase;
  font-weight: 600;
  margin-bottom: 14px;
}

.section-title {
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: -0.01em;
  margin: 0 0 16px;
}

.section-lead {
  color: var(--color-text-muted);
  font-size: 16px;
  line-height: 1.9;
  margin: 0;
}

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  background-color: rgba(255, 255, 255, 0);
  backdrop-filter: blur(0);
  transition: background-color 0.3s ease, backdrop-filter 0.3s ease,
    box-shadow 0.3s ease, border-color 0.3s ease;
  border-bottom: 1px solid transparent;
}

.site-header.is-scrolled {
  background-color: rgba(255, 255, 255, 0.85);
  backdrop-filter: saturate(160%) blur(14px);
  border-bottom-color: var(--color-border-soft);
  box-shadow: var(--shadow-sm);
}

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

.site-header__brand {
  font-weight: 700;
  color: var(--color-text);
  font-size: 18px;
  letter-spacing: -0.01em;
  font-family: var(--font-en);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--color-primary), var(--color-accent-teal));
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-family: var(--font-en);
  font-weight: 800;
  font-size: 14px;
  line-height: 1;
  letter-spacing: 0;
}

/* safa ロゴ画像用 */
.brand-logo {
  display: inline-block;
  height: 36px;
  width: auto;
  object-fit: contain;
  flex-shrink: 0;
}

.footer-brand__title .brand-logo {
  height: 32px;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 32px;
}

.site-nav__list {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-nav__link {
  color: var(--color-text);
  font-size: 14.5px;
  font-weight: 500;
  position: relative;
}

.site-nav__link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -6px;
  height: 2px;
  background: var(--color-primary);
  border-radius: 2px;
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.2s ease;
}

.site-nav__link:hover::after { transform: scaleX(1); }

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  align-items: center;
  justify-content: center;
  color: var(--color-text);
}

.nav-toggle:hover { background-color: var(--color-bg-mute); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: 180px 0 120px;
  overflow: hidden;
  background:
    radial-gradient(60% 60% at 80% 0%, rgba(47, 117, 242, 0.08), transparent 70%),
    radial-gradient(40% 40% at 0% 60%, rgba(20, 184, 166, 0.06), transparent 70%),
    var(--color-bg);
}

.hero__greetings-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  user-select: none;
  overflow: hidden;
}

.hero__greetings-bg span {
  position: absolute;
  font-weight: 700;
  color: rgba(47, 117, 242, 0.055);
  line-height: 1;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.hero__greetings-bg .g-deva {
  font-family: var(--font-deva);
  font-size: clamp(140px, 22vw, 280px);
  top: -10px;
  right: -40px;
}

.hero__greetings-bg .g-kr {
  font-family: var(--font-kr);
  font-size: clamp(100px, 14vw, 180px);
  bottom: 8%;
  left: -50px;
  color: rgba(20, 184, 166, 0.05);
}

.hero__greetings-bg .g-es {
  font-family: var(--font-en);
  font-size: clamp(80px, 11vw, 140px);
  top: 12%;
  left: 6%;
  color: rgba(245, 158, 11, 0.05);
  font-style: italic;
  font-weight: 800;
}

.hero__greetings-bg .g-en {
  font-family: var(--font-en);
  font-size: clamp(80px, 11vw, 140px);
  bottom: -10px;
  right: 18%;
  color: rgba(47, 117, 242, 0.04);
  font-weight: 800;
}

.hero__inner {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 820px;
  margin: 0 auto;
}

.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background-color: var(--color-primary-light);
  color: var(--color-primary);
  font-family: var(--font-en);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.12em;
  padding: 6px 16px;
  border-radius: 999px;
  margin-bottom: 28px;
  text-transform: uppercase;
}

.hero__eyebrow .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--color-primary);
  display: inline-block;
}

.hero__title {
  font-size: clamp(38px, 6vw, 68px);
  font-weight: 700;
  line-height: 1.32;
  letter-spacing: -0.025em;
  margin: 0 0 32px;
}

.hero__title .accent {
  background: linear-gradient(120deg, var(--color-primary), var(--color-accent-teal));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero__lead {
  font-size: 18px;
  line-height: 2;
  color: var(--color-text-muted);
  margin: 0 0 44px;
  max-width: 580px;
  margin-left: auto;
  margin-right: auto;
}

.hero__lead strong {
  font-weight: 600;
  color: var(--color-text);
}

.hero__cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background-color: var(--color-text);
  color: #fff;
  padding: 14px 28px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 15px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
  box-shadow: var(--shadow-sm);
}

.hero__cta:hover {
  color: #fff;
  background-color: #000;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* ---------- Featured App ---------- */
.featured-app {
  position: relative;
  background: linear-gradient(180deg, #fff 0%, var(--color-primary-light) 100%);
  border: 1px solid var(--color-border-soft);
  border-radius: var(--radius-xl);
  padding: 64px;
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.featured-app::before {
  content: "नमस्ते";
  position: absolute;
  font-family: var(--font-deva);
  font-size: clamp(160px, 22vw, 280px);
  font-weight: 700;
  color: rgba(47, 117, 242, 0.06);
  top: -40px;
  right: -20px;
  pointer-events: none;
  line-height: 1;
}

.featured-app__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  position: relative;
  z-index: 1;
}

.featured-app__status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background-color: rgba(20, 184, 166, 0.12);
  color: var(--color-accent-teal);
  font-family: var(--font-en);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 20px;
  align-self: flex-start;
  text-transform: uppercase;
}

.featured-app__status .pulse {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--color-accent-teal);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.featured-app__title {
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: -0.01em;
  margin: 0 0 16px;
}

.featured-app__deva {
  font-family: var(--font-deva);
  font-size: 32px;
  font-weight: 700;
  color: var(--color-primary);
  margin: 0 0 16px;
  line-height: 1;
}

.featured-app__desc {
  font-size: 16px;
  line-height: 1.9;
  color: var(--color-text-muted);
  margin: 0 0 24px;
  max-width: 540px;
}

.featured-app__stats {
  display: flex;
  flex-wrap: wrap;
  gap: 24px 40px;
  margin-bottom: 36px;
}

.featured-app__stat {
  display: flex;
  flex-direction: column;
}

.featured-app__stat-number {
  font-family: var(--font-en);
  font-size: 32px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--color-text);
  background: linear-gradient(135deg, var(--color-primary), var(--color-accent-teal));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 4px;
}

.featured-app__stat-label {
  font-size: 13px;
  color: var(--color-text-muted);
  font-weight: 500;
}

.featured-app__cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background-color: var(--color-primary);
  color: #fff;
  padding: 14px 26px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 15px;
  transition: background-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
  align-self: flex-start;
}

.featured-app__cta:hover {
  background-color: var(--color-primary-dark);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(47, 117, 242, 0.3);
}

/* ---------- Coming Soon ---------- */
.coming-soon-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.coming-soon-card {
  position: relative;
  background: #fff;
  border: 1px solid var(--color-border-soft);
  border-radius: var(--radius-md);
  padding: 36px 28px;
  text-align: center;
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.coming-soon-card:hover {
  transform: translateY(-3px);
  border-color: rgba(47, 117, 242, 0.2);
  box-shadow: var(--shadow-md);
}

.coming-soon-card__greeting {
  font-size: 38px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--color-text);
  margin: 0 0 12px;
  min-height: 50px;
}

.coming-soon-card__greeting.kr { font-family: var(--font-kr); }
.coming-soon-card__greeting.latin { font-family: var(--font-en); font-style: italic; }

.coming-soon-card__lang {
  font-size: 16px;
  font-weight: 600;
  margin: 0 0 8px;
}

.coming-soon-card__status {
  font-family: var(--font-en);
  font-size: 12px;
  font-weight: 600;
  color: var(--color-text-subtle);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ---------- Philosophy ---------- */
.philosophy-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.philosophy-card {
  background: #fff;
  border: 1px solid var(--color-border-soft);
  border-radius: var(--radius-md);
  padding: 32px;
  display: flex;
  gap: 20px;
  align-items: flex-start;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.philosophy-card:hover {
  transform: translateY(-3px);
  border-color: rgba(47, 117, 242, 0.2);
  box-shadow: var(--shadow-md);
}

.philosophy-card__icon {
  flex-shrink: 0;
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background-color: var(--color-primary-light);
  color: var(--color-primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.philosophy-card--accent .philosophy-card__icon {
  background-color: rgba(20, 184, 166, 0.12);
  color: var(--color-accent-teal);
}

.philosophy-card__body {
  flex: 1;
}

.philosophy-card__title {
  font-size: 18px;
  font-weight: 700;
  margin: 0 0 8px;
  letter-spacing: -0.005em;
}

.philosophy-card__desc {
  font-size: 14.5px;
  color: var(--color-text-muted);
  line-height: 1.85;
  margin: 0;
}

/* ---------- About ---------- */
.about-block {
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
}

.about-block__text {
  font-size: 17px;
  line-height: 2;
  color: var(--color-text-muted);
  margin: 0 0 36px;
}

.about-block__text strong {
  color: var(--color-text);
  font-weight: 600;
}

.about-block__cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background-color: var(--color-text);
  color: #fff;
  padding: 12px 24px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 14px;
  transition: transform 0.2s ease, background-color 0.2s ease;
}

.about-block__cta:hover {
  background-color: #000;
  color: #fff;
  transform: translateY(-2px);
}

/* ---------- Footer ---------- */
.site-footer {
  background-color: #0F172A;
  color: #CBD5E1;
  padding: 72px 0 32px;
}

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

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 56px;
}

.footer-brand__title {
  font-size: 17px;
  font-weight: 700;
  color: #fff;
  margin: 0 0 12px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-en);
  letter-spacing: -0.005em;
}

.footer-brand__desc {
  font-size: 14px;
  color: #94A3B8;
  line-height: 1.85;
  margin: 0;
  max-width: 360px;
}

.footer-col__title {
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin: 0 0 18px;
  font-family: var(--font-en);
}

.footer-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-col li {
  margin-bottom: 12px;
  font-size: 14.5px;
}

.footer-col__sub {
  font-size: 11px;
  color: #64748B;
  margin-left: 8px;
  font-family: var(--font-en);
  letter-spacing: 0.04em;
}

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

.footer-bottom__greetings {
  font-family: var(--font-en);
  color: #CBD5E1;
  letter-spacing: 0.02em;
  display: inline-flex;
  gap: 16px;
}

.footer-bottom__greetings span {
  opacity: 0.7;
}

.footer-bottom__greetings .deva { font-family: var(--font-deva); }
.footer-bottom__greetings .kr { font-family: var(--font-kr); }

/* ============================================
   Article pages (privacy / terms)
   ============================================ */
.page-hero {
  padding: 160px 0 56px;
  background:
    radial-gradient(60% 60% at 80% 0%, rgba(47, 117, 242, 0.06), transparent 70%),
    var(--color-bg);
}

.page-hero__breadcrumb {
  font-size: 13px;
  color: var(--color-text-muted);
  margin-bottom: 16px;
}

.page-hero__title {
  font-size: clamp(32px, 4.6vw, 48px);
  font-weight: 700;
  margin: 0 0 12px;
  letter-spacing: -0.01em;
}

.page-hero__meta {
  font-size: 14px;
  color: var(--color-text-muted);
  font-family: var(--font-en);
}

.article {
  max-width: 760px;
  margin: 0 auto;
  padding: 56px 24px 96px;
  font-size: 15.5px;
  line-height: 1.95;
  color: var(--color-text);
}

.article h2 {
  font-size: 22px;
  font-weight: 700;
  margin: 56px 0 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--color-border-soft);
  letter-spacing: -0.005em;
}

.article h2:first-of-type { margin-top: 0; }

.article h3 {
  font-size: 17px;
  font-weight: 700;
  margin: 32px 0 12px;
}

.article p {
  margin: 0 0 18px;
  color: #2F374A;
}

.article ul {
  padding-left: 1.4em;
  margin: 0 0 18px;
}

.article li { margin-bottom: 8px; }

.article strong {
  font-weight: 700;
  color: var(--color-text);
}

.back-to-top {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 40px;
  font-size: 14px;
  font-weight: 600;
  color: var(--color-primary);
}

.back-to-top:hover { gap: 10px; }

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 960px) {
  .featured-app {
    padding: 48px 36px;
  }

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

@media (max-width: 720px) {
  .section { padding: 80px 0; }
  .section-header { margin-bottom: 48px; }

  .hero { padding: 140px 0 80px; }

  .site-nav {
    position: fixed;
    inset: 72px 0 auto 0;
    background-color: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--color-border-soft);
    padding: 24px;
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
    transform: translateY(-12px);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.22s ease, opacity 0.22s ease;
  }

  .site-nav.is-open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
    box-shadow: var(--shadow-md);
  }

  .site-nav__list {
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
  }

  .site-nav__link {
    display: block;
    padding: 12px 4px;
    border-bottom: 1px solid var(--color-border-soft);
    font-size: 15px;
  }

  .site-nav__link::after { display: none; }

  .nav-toggle { display: inline-flex; }

  .featured-app {
    padding: 36px 24px;
    border-radius: var(--radius-lg);
  }

  .featured-app__stats {
    gap: 20px 28px;
  }

  .coming-soon-grid {
    grid-template-columns: 1fr;
  }

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

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

  .footer-bottom {
    flex-direction: column;
    gap: 14px;
    text-align: center;
  }

  .footer-bottom__greetings {
    flex-wrap: wrap;
    justify-content: center;
  }
}
