/* =========================================================
   DataLink Smart Core - Page-specific Styles
   ========================================================= */

/* =========================================================
   Sub-page Hero (Services, Advantages, News, Contact, Privacy, Terms)
   ========================================================= */

.subpage-hero {
  position: relative;
  padding: calc(72px + clamp(4rem, 8vw, 7rem)) 0 clamp(3rem, 5vw, 5rem);
  overflow: hidden;
}

.breadcrumb {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--ink-3);
  letter-spacing: 0.05em;
  margin-bottom: var(--s-5);
}

.breadcrumb a {
  color: var(--ink-2);
  transition: color var(--t-base) var(--ease);
}

.breadcrumb a:hover { color: var(--ink-1); }

.breadcrumb-sep { color: var(--ink-4); }

/* Subpage hero text fills the full container width so it aligns
   edge-to-edge with the sections below. The H1's natural line breaks
   (where present in the HTML, e.g. <br>) still control vertical
   layout. The lead explicitly overrides the global `p { max-width: 64ch }`
   rule so it spans the full container. */
.subpage-hero h1 {
  margin-bottom: var(--s-5);
}

.subpage-hero .lead {
  color: var(--ink-2);
  font-size: clamp(1.05rem, 1.5vw, 1.2rem);
  line-height: 1.7;
  width: 100%;
  max-width: none !important;
}

/* =========================================================
   Filter buttons (for News page)
   ========================================================= */

.filters {
  display: flex;
  gap: var(--s-2);
  flex-wrap: wrap;
  margin-bottom: var(--s-8);
  padding-bottom: var(--s-6);
  border-bottom: 1px solid var(--line);
}

.filter-btn {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--ink-2);
  letter-spacing: 0.05em;
  padding: 8px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  transition: all var(--t-base) var(--ease);
}

.filter-btn:hover {
  color: var(--ink-1);
  border-color: var(--line-2);
}

.filter-btn.active {
  color: var(--bg);
  background: var(--ink-1);
  border-color: var(--ink-1);
}

/* =========================================================
   Timeline (for News page)
   ========================================================= */

.timeline {
  position: relative;
  max-width: 820px;
  margin: 0 auto;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 100px;
  top: 0;
  bottom: 0;
  width: 1px;
  background: var(--line);
}

.timeline-item {
  position: relative;
  padding-left: 140px;
  padding-bottom: var(--s-8);
}

.timeline-item:last-child { padding-bottom: 0; }

.timeline-item::before {
  content: '';
  position: absolute;
  left: 96px;
  top: 12px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--bg);
  border: 1px solid var(--line-3);
}

.timeline-date {
  position: absolute;
  left: 0;
  top: 8px;
  width: 80px;
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--ink-3);
  letter-spacing: 0.05em;
}

.timeline-content h3 {
  font-size: 1.15rem;
  font-weight: 500;
  margin-bottom: var(--s-3);
  color: var(--ink-1);
  letter-spacing: -0.01em;
}

.timeline-content p {
  font-size: 0.95rem;
  color: var(--ink-2);
  line-height: 1.7;
  margin-bottom: var(--s-4);
}

.timeline-tags {
  display: flex;
  gap: var(--s-2);
  flex-wrap: wrap;
}

.timeline-tag {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--ink-3);
  padding: 3px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
}

@media (max-width: 700px) {
  .timeline::before { left: 12px; }
  .timeline-item { padding-left: 36px; padding-bottom: var(--s-6); }
  .timeline-item::before { left: 8px; }
  .timeline-date { position: static; width: auto; margin-bottom: var(--s-2); }
}

/* =========================================================
   Team grid (for Advantages page)
   ========================================================= */

.team-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--s-5);
}

@media (max-width: 900px) { .team-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .team-grid { grid-template-columns: 1fr; } }

.team {
  text-align: left;
  padding: var(--s-5);
  background: var(--surface-1);
  border: 1px solid var(--line);
  border-radius: 16px;
  transition: all var(--t-base) var(--ease);
}

.team:hover { border-color: var(--line-2); }

.team-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--surface-2);
  border: 1px solid var(--line-2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--serif);
  font-size: 1.1rem;
  color: var(--ink-2);
  margin-bottom: var(--s-4);
}

.team-name {
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--ink-1);
  margin-bottom: 4px;
}

.team-role {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--ink-3);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: var(--s-3);
}

.team p {
  font-size: 0.85rem;
  line-height: 1.6;
  color: var(--ink-2);
  margin-bottom: var(--s-4);
}

.team-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.team-tag {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--ink-3);
  padding: 3px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
}

/* =========================================================
   FAQ (used on services page)
   ========================================================= */

.faq {
  max-width: 760px;
  margin: 0 auto;
}

.faq-item {
  border-bottom: 1px solid var(--line);
  padding: var(--s-5) 0;
}

.faq-item:first-child { border-top: 1px solid var(--line); }

.faq-q {
  width: 100%;
  text-align: left;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--s-5);
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--ink-1);
  padding: 0;
  letter-spacing: -0.01em;
}

.faq-icon {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line-2);
  border-radius: 50%;
  color: var(--ink-2);
  flex-shrink: 0;
  transition: all var(--t-base) var(--ease);
  font-size: 1.1rem;
  font-family: var(--serif);
}

.faq-item.open .faq-icon {
  background: var(--ink-1);
  color: var(--bg);
  border-color: var(--ink-1);
  transform: rotate(45deg);
}

.faq-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--t-slow) var(--ease);
}

.faq-item.open .faq-a {
  max-height: 500px;
}

.faq-a-inner {
  padding-top: var(--s-4);
  color: var(--ink-2);
  font-size: 0.95rem;
  line-height: 1.7;
  max-width: 64ch;
}

/* =========================================================
   Legal / Compliance page styles (Privacy, Terms)
   ========================================================= */

.legal-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: var(--s-8);
  align-items: start;
}

@media (max-width: 1024px) {
  .legal-layout { grid-template-columns: 1fr; gap: var(--s-6); }
}

.legal-sidebar {
  position: sticky;
  top: calc(72px + var(--s-5));
  background: var(--surface-1);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: var(--s-5);
  max-height: calc(100vh - 72px - var(--s-7));
  overflow-y: auto;
}

@media (max-width: 1024px) {
  .legal-sidebar { position: static; max-height: none; }
}

.legal-sidebar-title {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--ink-3);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: var(--s-4);
  font-weight: 400;
}

.legal-toc { display: flex; flex-direction: column; gap: 2px; }

.legal-toc a {
  display: block;
  font-size: 0.85rem;
  color: var(--ink-2);
  padding: 6px 12px;
  border-left: 2px solid transparent;
  border-radius: 4px;
  transition: all var(--t-base) var(--ease);
  line-height: 1.5;
}

.legal-toc a:hover { color: var(--ink-1); }

.legal-toc a.active {
  color: var(--ink-1);
  border-left-color: var(--accent);
  background: var(--surface-2);
}

.legal-toc .sub a {
  padding-left: 24px;
  font-size: 0.8rem;
  color: var(--ink-3);
}

.legal-content {
  background: var(--surface-1);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: var(--s-7) clamp(2rem, 4vw, 3.5rem);
}

.legal-version {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  color: var(--ink-3);
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  margin-bottom: var(--s-4);
  background: var(--surface-2);
}

.legal-version .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

.legal-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-6);
  padding: var(--s-5);
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  margin-bottom: var(--s-7);
}

.legal-meta-item { min-width: 140px; }

.legal-meta-label {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--ink-3);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.legal-meta-value {
  font-size: 0.9rem;
  color: var(--ink-1);
  font-weight: 500;
}

.legal-section {
  margin-bottom: var(--s-8);
  scroll-margin-top: calc(72px + var(--s-5));
}

.legal-section:last-child { margin-bottom: 0; }

.legal-section h2 {
  font-family: var(--serif);
  font-size: 1.5rem;
  font-weight: 500;
  margin-bottom: var(--s-5);
  padding-bottom: var(--s-3);
  border-bottom: 1px solid var(--line);
  letter-spacing: -0.01em;
}

.legal-section h3 {
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--ink-1);
  margin: var(--s-6) 0 var(--s-3);
  letter-spacing: -0.005em;
}

.legal-section p, .legal-section li {
  font-size: 0.92rem;
  color: var(--ink-2);
  line-height: 1.8;
  margin-bottom: var(--s-3);
}

.legal-section ul, .legal-section ol {
  padding-left: var(--s-5);
  margin-bottom: var(--s-4);
}

.legal-section ul li, .legal-section ol li {
  list-style: none;
  position: relative;
  padding-left: var(--s-4);
  margin-bottom: var(--s-2);
}

.legal-section ul li::before {
  content: '·';
  position: absolute;
  left: 0;
  color: var(--ink-3);
  font-weight: 700;
}

.legal-section ol {
  counter-reset: legal-counter;
}

.legal-section ol li {
  counter-increment: legal-counter;
  padding-left: var(--s-6);
}

.legal-section ol li::before {
  content: counter(legal-counter, decimal-leading-zero);
  position: absolute;
  left: 0;
  color: var(--ink-3);
  font-family: var(--mono);
  font-size: 0.82rem;
  font-weight: 500;
}

.legal-section strong { color: var(--ink-1); font-weight: 500; }

.legal-section code {
  font-family: var(--mono);
  font-size: 0.85em;
  background: var(--surface-2);
  padding: 2px 8px;
  border-radius: 4px;
  color: var(--ink-1);
  border: 1px solid var(--line);
}

.legal-callout {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-left: 2px solid var(--accent);
  border-radius: 8px;
  padding: var(--s-5);
  margin: var(--s-5) 0;
}

.legal-callout-title {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--ink-2);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: var(--s-2);
}

.legal-callout p { margin-bottom: 0; font-size: 0.9rem; }

/* =========================================================
   Contact page
   ========================================================= */

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: var(--s-8);
  align-items: start;
}

@media (max-width: 900px) {
  .contact-grid { grid-template-columns: 1fr; gap: var(--s-6); }
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: var(--s-4);
}

.contact-card {
  padding: var(--s-5);
  background: var(--surface-1);
  border: 1px solid var(--line);
  border-radius: 14px;
  transition: all var(--t-base) var(--ease);
}

.contact-card:hover { border-color: var(--line-2); }

.contact-label {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--ink-3);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: var(--s-2);
}

.contact-value {
  font-size: 1rem;
  color: var(--ink-1);
  font-weight: 500;
  margin-bottom: var(--s-2);
  word-break: break-word;
}

.contact-value a { color: var(--ink-1); }
.contact-value a:hover { color: var(--accent); }

.contact-note {
  font-size: 0.85rem;
  color: var(--ink-3);
  line-height: 1.6;
}

/* ---- Form ---- */

.form {
  background: var(--surface-1);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: var(--s-7);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s-4);
}

@media (max-width: 600px) { .form-row { grid-template-columns: 1fr; } }

.form-group { margin-bottom: var(--s-5); }

.form-label {
  display: block;
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--ink-2);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: var(--s-2);
}

.form-label .req { color: var(--accent); margin-left: 4px; }

.form-control {
  width: 100%;
  padding: 12px 16px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--ink-1);
  font-family: var(--sans);
  font-size: 0.95rem;
  transition: all var(--t-base) var(--ease);
  outline: none;
}

.form-control:focus {
  border-color: var(--accent-line);
  background: var(--surface-3);
}

textarea.form-control { min-height: 140px; resize: vertical; }

.form-help {
  font-size: 0.78rem;
  color: var(--ink-3);
  margin-top: var(--s-2);
}

.form-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.88rem;
  color: var(--ink-2);
  line-height: 1.55;
  cursor: pointer;
}

.form-checkbox input {
  width: 16px;
  height: 16px;
  margin-top: 3px;
  accent-color: var(--accent);
  flex-shrink: 0;
  cursor: pointer;
}

.form-checkbox a { color: var(--accent); }
.form-checkbox a:hover { text-decoration: underline; }

.form-feedback {
  padding: var(--s-3) var(--s-4);
  border-radius: 8px;
  margin-bottom: var(--s-5);
  font-size: 0.88rem;
  display: none;
}

.form-feedback.success {
  display: block;
  background: var(--accent-soft);
  border: 1px solid var(--accent-line);
  color: var(--ink-1);
}

.form-feedback.error {
  display: block;
  background: rgba(212, 160, 90, 0.1);
  border: 1px solid rgba(212, 160, 90, 0.3);
  color: var(--ink-1);
}

/* =========================================================
   Map placeholder (Contact)
   ========================================================= */

.map-frame {
  background: var(--surface-1);
  border: 1px solid var(--line);
  border-radius: 20px;
  aspect-ratio: 21 / 9;
  position: relative;
  overflow: hidden;
  margin-top: var(--s-7);
}

.map-frame svg { width: 100%; height: 100%; display: block; }