/* ── RESET ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ── MODERN THEME TOKENS ── */
:root {
  --ink: #1a1410;
  --paper: #faf7f2;
  --red: #c0392b;
  --red-light: #e74c3c;
  --muted: #7a6f65;
  --border: #e0d9cf;
  --surface: #ffffff;
  --cyan-accent: #0ea5e9;
  --nav-bg: #1a1410;        /* Solid dark background for nav */
  --footer-bg: #1a1410;     /* Solid dark background for footer */
  --font-sans: 'DM Sans', sans-serif;
  --font-serif: 'Shippori Mincho', serif;
}

html { scroll-behavior: smooth; }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-weight: 400;         /* Increased from 300 for better readability */
  line-height: 1.75;        /* Softer, more modern line height */
  overflow-x: hidden;
  font-size: 1.05rem;       /* Global base font size increase */
}

/* ── TYPOGRAPHY SCALE (LARGER TEXT) ── */
h1, h2, h3, h4, .big-num, .nav-title, .license-card h3 {
  font-family: var(--font-serif);
}

h1 {
  font-size: clamp(3rem, 6vw, 5.5rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

h2 {
  font-size: clamp(2rem, 3.8vw, 3rem);
  font-weight: 800;
  line-height: 1.25;
  margin-bottom: 1.2rem;
}

p, li, .method-steps li, .policy-container p, .delete-container p {
  font-size: 1.05rem;
  line-height: 1.75;
}

/* ── NAV (DARK SOLID FOR LOGO VISIBILITY) ── */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 3rem;
  background: var(--nav-bg); /* Solid dark background ensures white logo text pops */
  backdrop-filter: none;     /* Removed blur for cleaner, modern look */
  border-bottom: 1px solid rgba(255,255,255,0.1);
  height: 72px;              /* Slightly taller for modern spacing */
}

.nav-brand {
  display: flex; align-items: center; gap: 0.75rem;
  text-decoration: none;
}

.nav-logo {
  width: 200px;
  height: auto;
  border-radius: 8px;
  object-fit: contain;
  filter: brightness(1.05);  /* Slight enhancement for any PNG artifacts */
}

.nav-title {
  font-family: var(--font-serif);
  font-size: 1.2rem;        /* Larger */
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #fff;
}

.nav-links {
  display: flex; gap: 2.5rem; list-style: none; align-items: center;
}

.nav-links a {
  text-decoration: none;
  color: rgba(250,247,242,0.8);
  font-size: 1rem;          /* Larger */
  font-weight: 500;
  letter-spacing: 0.02em;
  transition: color 0.2s;
}

.nav-links a:hover { color: var(--red-light); }

/* ── BUTTONS ── */
.btn {
  display: inline-block;
  text-decoration: none;
  padding: 0.9rem 2.2rem;
  border-radius: 60px;      /* Pill shape for modern feel */
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  transition: all 0.25s ease;
  cursor: pointer;
  border: none;
}

.btn-primary {
  background: var(--red);
  color: #fff;
  box-shadow: 0 2px 8px rgba(192,57,43,0.2);
}
.btn-primary:hover { 
  background: var(--red-light); 
  transform: translateY(-3px);
  box-shadow: 0 6px 14px rgba(192,57,43,0.25);
}

/* ── PAGE HERO ── */
.page-hero {
  padding: 12rem 3rem 6rem;
  position: relative;
  border-bottom: 1px solid var(--border);
}

.page-hero::before {
  content: '概';
  position: absolute;
  right: -0.05em;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--font-serif);
  font-size: 38vw;
  color: rgba(192,57,43,0.035);
  pointer-events: none;
  line-height: 1;
}

.page-hero-inner {
  max-width: 860px;
  position: relative;
  z-index: 1;
}

.eyebrow {
  display: inline-flex; align-items: center; gap: 0.75rem;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 1.5rem;
}

.eyebrow::before {
  content: '';
  display: block; width: 32px; height: 2px;
  background: var(--red);
}

.page-hero h1 {
  font-family: var(--font-serif);
  font-size: clamp(3rem, 6vw, 5.5rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 1.5rem;
}

.page-hero h1 .jp {
  display: block;
  color: var(--red);
  font-size: 0.5em;
  letter-spacing: 0.08em;
  margin-top: 0.4em;
}

.page-hero p {
  font-size: 1.15rem;
  color: var(--muted);
  max-width: 580px;
  line-height: 1.8;
}

/* ── SECTION COMMON ── */
.section-label {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 0.75rem;
  display: flex; align-items: center; gap: 0.75rem;
}

.section-label::after {
  content: '';
  flex: 1; height: 1px;
  background: var(--border);
}

/* ── APP IDENTITY SECTION ── */
#app-identity {
  padding: 6rem 3rem;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.identity-grid {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: center;
}

.identity-text p {
  color: var(--muted);
  font-size: 1.05rem;
  margin-bottom: 1.25rem;
}

.identity-text p strong {
  color: var(--ink);
  font-weight: 600;
}

.feature-list {
  list-style: none;
  margin-top: 2.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.feature-list li {
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
}

.feature-list .icon {
  width: 48px; height: 48px;
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-serif);
  font-size: 1.3rem;
  flex-shrink: 0;
  color: var(--red);
}

.feature-list .txt strong {
  display: block;
  font-size: 1rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 0.3rem;
}

.feature-list .txt span {
  font-size: 0.9rem;
  color: var(--muted);
}

/* ── STATS CARD ── */
.stats-card {
  background: var(--ink);
  border-radius: 32px;
  padding: 2.8rem;
  color: #fff;
  position: relative;
  overflow: hidden;
}

.stats-card::before {
  content: '学';
  position: absolute;
  right: -0.1em; bottom: -0.15em;
  font-family: var(--font-serif);
  font-size: 12rem;
  color: rgba(255,255,255,0.04);
  line-height: 1;
  pointer-events: none;
}

.stats-card .big-num {
  font-family: var(--font-serif);
  font-size: 3.2rem;
  font-weight: 800;
  color: var(--red-light);
  display: block;
  margin-bottom: 0.3rem;
}

.stats-card > p {
  color: rgba(250,247,242,0.6);
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 2rem;
}

.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.2rem;
}

.stat-box {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 20px;
  padding: 1.2rem;
}

.stat-box strong {
  display: block;
  font-size: 1.6rem;
  font-family: var(--font-serif);
  font-weight: 800;
  color: #fff;
  margin-bottom: 0.3rem;
}

.stat-box span {
  font-size: 0.8rem;
  color: rgba(250,247,242,0.6);
  letter-spacing: 0.02em;
}

/* ── OPEN SOURCE LICENSES ── */
#licenses {
  padding: 6rem 3rem;
  border-bottom: 1px solid var(--border);
}

#licenses .inner {
  max-width: 1000px;
  margin: 0 auto;
}

#licenses .intro-p {
  color: var(--muted);
  font-size: 1.05rem;
  margin-bottom: 2.5rem;
  max-width: 620px;
}

.license-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.8rem;
}

.license-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 1.8rem;
  transition: all 0.25s ease;
  position: relative;
  overflow: hidden;
}

.license-card:hover {
  border-color: var(--red-light);
  box-shadow: 0 12px 24px rgba(0,0,0,0.04);
  transform: translateY(-4px);
}

.license-card.clickable { cursor: pointer; }

.license-card.clickable::after {
  content: '↗';
  position: absolute;
  top: 1.4rem; right: 1.4rem;
  font-size: 1rem;
  color: var(--red);
  opacity: 0;
  transition: opacity 0.2s;
}

.license-card.clickable:hover::after { opacity: 1; }

.license-tag {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--red);
  background: rgba(192,57,43,0.08);
  border: 1px solid rgba(192,57,43,0.2);
  border-radius: 60px;
  padding: 0.2rem 0.9rem;
  margin-bottom: 1.2rem;
}

.license-card h3 {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 0.4rem;
}

.license-card .subtitle {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 1rem;
  letter-spacing: 0.01em;
}

.license-divider {
  height: 1px;
  background: var(--border);
  margin-bottom: 1.2rem;
}

.license-card p {
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.7;
}

/* ── LICENSE MODAL (DARK MODERN) ── */
.modal-backdrop {
  display: none;
  position: fixed; inset: 0; z-index: 200;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(8px);
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal-backdrop.open { display: flex; }

.modal {
  background: #1a1c23;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 28px;
  width: 100%;
  max-width: 680px;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: modalIn 0.25s cubic-bezier(0.2, 0.9, 0.4, 1.1);
}

@keyframes modalIn {
  from { opacity: 0; transform: scale(0.96) translateY(12px); }
  to   { opacity: 1; transform: none; }
}

.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.5rem 2rem;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.modal-header h4 {
  font-size: 1.1rem;
  font-weight: 600;
  color: #fff;
}

.modal-close {
  background: none; border: none; cursor: pointer;
  color: rgba(255,255,255,0.6);
  font-size: 1.3rem;
  line-height: 1;
  padding: 0.3rem;
  transition: color 0.2s;
}

.modal-close:hover { color: var(--red-light); }

.modal-body {
  padding: 1.5rem 2rem;
  overflow-y: auto;
  flex: 1;
}

.modal-body pre {
  font-size: 0.85rem;
  font-family: 'Courier New', monospace;
  color: rgba(255,255,255,0.85);
  line-height: 1.7;
  white-space: pre-wrap;
  word-break: break-word;
}

.modal-body a {
  color: var(--cyan-accent);
}

.modal-footer {
  padding: 1rem 2rem;
  border-top: 1px solid rgba(255,255,255,0.08);
  display: flex; justify-content: flex-end;
}

.btn-modal-close {
  background: none; border: 1px solid rgba(255,255,255,0.2);
  color: rgba(255,255,255,0.8);
  padding: 0.6rem 1.4rem;
  border-radius: 60px;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-modal-close:hover { border-color: var(--red-light); color: #fff; }

/* ── MADE BY SECTION ── */
#made-by {
  padding: 6rem 3rem;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.made-by-inner {
  max-width: 1000px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.made-by-logo-block {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* Logo background ensures white text remains readable */
.made-by-logo-block img {
  max-width: 240px;
  height: auto;
  background: var(--ink);    /* Dark background for white logo text */
  border-radius: 20px;
  padding: 1rem 1.5rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.made-by-logo-block p {
  font-size: 0.98rem;
  color: var(--muted);
  line-height: 1.75;
}

.made-by-logo-block a {
  color: var(--red);
  text-decoration: none;
  font-weight: 500;
}

.made-by-logo-block a:hover { text-decoration: underline; }

.tech-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.tech-list li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.95rem;
  color: var(--muted);
}

.tech-dot {
  width: 8px; height: 8px;
  background: var(--red-light);
  border-radius: 50%;
  flex-shrink: 0;
}

.tech-list strong {
  color: var(--ink);
  font-weight: 600;
}

/* ── FOOTER (DARK SOLID FOR LOGO CONSISTENCY) ── */
footer {
  background: var(--footer-bg);
  border-top: 1px solid rgba(255,255,255,0.08);
  padding: 2rem 3rem;
  display: flex; justify-content: space-between; align-items: center;
  font-size: 0.9rem;
  color: rgba(250,247,242,0.6);
}

footer a { 
  color: rgba(250,247,242,0.7); 
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}
footer a:hover { color: var(--red-light); }

/* ── ANIMATIONS ── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(28px); }
  to   { opacity: 1; transform: none; }
}

.anim {
  opacity: 0;
  animation: fadeUp 0.65s cubic-bezier(0.2, 0.9, 0.4, 1.1) forwards;
}

/* ── PRIVACY POLICY PAGE (MODERN) ── */
.policy-wrap {
  padding-top: 72px;
}

.policy-container {
  max-width: 860px;
  margin: 4rem auto;
  background: var(--surface);
  padding: 3rem 3.5rem;
  border-radius: 32px;
  border: 1px solid var(--border);
  box-shadow: 0 12px 30px rgba(0,0,0,0.03);
}

.policy-header {
  border-bottom: 1px solid var(--border);
  padding-bottom: 2rem;
  margin-bottom: 2.5rem;
}

.policy-brand {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--red);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.75rem;
}

.policy-container h1 {
  font-family: var(--font-serif);
  font-size: 2.8rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 0.5rem;
}

.policy-date {
  font-size: 0.9rem;
  color: var(--muted);
}

.policy-container h2 {
  font-family: var(--font-serif);
  font-size: 1.6rem;
  font-weight: 700;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.policy-container h2::before {
  content: '';
  display: inline-block;
  width: 5px;
  height: 1.4rem;
  background-color: var(--red);
  border-radius: 4px;
}

.policy-container p, .policy-container li {
  font-size: 1rem;
  color: var(--muted);
  margin-bottom: 1.2rem;
  line-height: 1.75;
}

.policy-notice {
  background: rgba(192,57,43,0.06);
  border-left: 4px solid var(--red);
  border-radius: 12px;
  padding: 1.2rem 1.6rem;
  margin-bottom: 1.8rem;
}

.license-block {
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 1.5rem 1.8rem;
  margin-bottom: 1.2rem;
}

/* ── DELETE DATA PAGE (embedded in style.css to avoid extra file) ── */
.delete-wrap {
  padding-top: 72px;
}

.delete-container {
  max-width: 880px;
  margin: 3rem auto;
  padding: 0 1.5rem 4rem;
}

.delete-hero {
  background: var(--ink);
  border-radius: 32px;
  padding: 3rem 3.5rem;
  margin-bottom: 2.5rem;
  position: relative;
}

.delete-hero::before {
  content: '削';
  position: absolute;
  right: -0.05em; bottom: -0.2em;
  font-family: var(--font-serif);
  font-size: 14rem;
  color: rgba(192,57,43,0.08);
  line-height: 1;
  pointer-events: none;
}

.delete-hero .eyebrow {
  color: rgba(250,247,242,0.6);
}

.delete-hero h1 {
  font-size: clamp(2.4rem, 4.5vw, 3.2rem);
  color: #fff;
  margin-bottom: 1rem;
}

.delete-hero h1 em { color: var(--red-light); font-style: normal; }
.delete-hero p { color: rgba(250,247,242,0.7); }

.warning-box {
  background: rgba(192,57,43,0.06);
  border-left: 4px solid var(--red);
  border-radius: 12px;
  padding: 1.2rem 1.8rem;
  margin-bottom: 2.5rem;
}

.data-inventory {
  background: var(--surface);
  border-radius: 28px;
  padding: 2rem 2.2rem;
  margin-bottom: 2.5rem;
  border: 1px solid var(--border);
}

.method-card {
  border-radius: 24px;
  margin-bottom: 1.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  overflow: hidden;
}

.method-card-header {
  padding: 1.5rem 2rem;
  background: rgba(0,0,0,0.01);
}

.method-num {
  width: 48px; height: 48px;
  background: var(--ink);
  border-radius: 60px;
  font-size: 1.2rem;
  font-weight: 800;
  color: #fff;
}

.method-card.preferred .method-num { background: var(--red); }

.preferred-tag {
  background: rgba(192,57,43,0.08);
  border-radius: 60px;
  padding: 0.25rem 0.8rem;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--red);
}

.method-card-body {
  padding: 1.5rem 2rem;
}

.method-steps li {
  font-size: 0.98rem;
  margin-bottom: 1rem;
}

.email-btn {
  background: var(--ink);
  border-radius: 60px;
  padding: 0.8rem 1.8rem;
  font-weight: 600;
  display: inline-flex;
  gap: 0.6rem;
  margin-top: 1rem;
}

.email-btn:hover { background: var(--red); }

.timeline-section {
  background: var(--ink);
  border-radius: 28px;
  padding: 2rem 2.5rem;
  margin-top: 2.5rem;
}

.tl-dot {
  width: 34px; height: 34px;
  background: rgba(255,255,255,0.08);
  border-radius: 60px;
}

.tl-dot.active { background: rgba(192,57,43,0.3); border-color: var(--red); }

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  body { font-size: 1rem; }
  nav { padding: 0 1.5rem; height: 64px; }
  .nav-links { display: none; }
  .page-hero { padding: 8rem 1.5rem 4rem; }
  #app-identity, #licenses, #made-by { padding: 4rem 1.5rem; }
  .identity-grid, .made-by-inner { grid-template-columns: 1fr; gap: 2.5rem; }
  .license-grid { grid-template-columns: 1fr; }
  footer { flex-direction: column; gap: 1rem; text-align: center; }
  .policy-container, .delete-container { padding: 1.5rem; margin: 1rem; }
  .policy-container h1 { font-size: 2.2rem; }
  .delete-hero { padding: 2rem 1.5rem; }
  .method-card-header { flex-wrap: wrap; }
}