/* ============================================================================
   Fatura → Excel — Anthropic esintili editoryal tasarım
   Palet: krem zemin #faf9f5 · koyu metin #141413 · tek vurgu Excel yeşili #217346
   Mavi yok. Başlıklar serif (editoryal), gövde sans-serif.
   ============================================================================ */
:root {
  --bg:         #faf9f5;   /* krem zemin */
  --bg-card:    #ffffff;
  --bg-sunken:  #f3f1ea;   /* hafif çukur alanlar */
  --ink:        #141413;   /* koyu metin */
  --muted:      #63615c;   /* ikincil metin */
  --faint:      #8a8781;
  --line:       #e6e3da;   /* ince çizgiler */
  --line-strong:#d8d4c8;
  --accent:     #217346;   /* Excel yeşili — tek vurgu */
  --accent-ink: #1a5c38;   /* koyu yeşil (hover) */
  --accent-soft:#e7f1ea;   /* yeşilin çok açığı */
  --warn:       #9a6a12;   /* uyarı (kehribar, mavi değil) */
  --warn-soft:  #f6eddb;
  --err:        #9a2b1e;
  --err-soft:   #f6e6e2;
  --radius:     14px;
  --radius-sm:  9px;
  --wrap:       1080px;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

/* HTML "hidden" özniteliği her zaman kazansın: bir öğenin display: flex/grid
   kuralı olsa bile hidden ise gizli kalır. JS ile açılıp kapanan modal, sekme
   formları, seçim ve durum kutuları buna dayanır. */
[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 32px;
}

h1, h2, h3 { font-family: var(--serif); font-weight: 500; letter-spacing: -0.01em; }

/* ---------------------------------------------------------------- Header --- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.2) blur(8px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 66px;
}
.brand {
  font-family: var(--serif);
  font-size: 21px;
  font-weight: 500;
  letter-spacing: -0.015em;
  color: var(--ink);
}
.brand-mark { color: var(--accent); }
.header-nav { display: flex; gap: 28px; }
.header-nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 14.5px;
  transition: color .15s;
}
.header-nav a:hover { color: var(--ink); }

/* ------------------------------------------------------------------ Hero --- */
.hero { padding: 84px 0 92px; }
.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 72px;
  align-items: center;
}
.eyebrow {
  margin: 0 0 22px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}
.hero-copy h1 {
  margin: 0 0 24px;
  font-size: 62px;
  line-height: 1.02;
  letter-spacing: -0.025em;
}
.hero .lead {
  margin: 0 0 28px;
  font-size: 19px;
  color: var(--muted);
  max-width: 30em;
}
.hero-points {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 11px;
}
.hero-points li {
  position: relative;
  padding-left: 30px;
  font-size: 15.5px;
  color: var(--ink);
}
.hero-points li::before {
  content: "";
  position: absolute;
  left: 0; top: 8px;
  width: 17px; height: 17px;
  background: var(--accent-soft);
  border-radius: 50%;
}
.hero-points li::after {
  content: "";
  position: absolute;
  left: 5px; top: 12px;
  width: 6px; height: 3.5px;
  border-left: 1.8px solid var(--accent);
  border-bottom: 1.8px solid var(--accent);
  transform: rotate(-45deg);
}

/* ----------------------------------------------------- Sürükle-bırak panel - */
.hero-panel {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: 0 1px 2px rgba(20,20,19,.04), 0 12px 32px -12px rgba(20,20,19,.12);
}
.dropzone {
  border: 2px dashed var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--bg-sunken);
  padding: 52px 28px;
  text-align: center;
  cursor: pointer;
  transition: border-color .15s, background .15s, transform .15s;
}
.dropzone:hover { border-color: var(--accent); background: var(--accent-soft); }
.dropzone.dragover {
  border-color: var(--accent);
  border-style: solid;
  background: var(--accent-soft);
  transform: scale(1.01);
}
.dropzone-inner { pointer-events: none; }
.dz-icon {
  width: 46px; height: 46px;
  color: var(--accent);
  margin-bottom: 16px;
}
.dz-title { font-size: 17px; font-weight: 600; margin: 0 0 6px; color: var(--ink); }
.dz-sub { font-size: 14.5px; color: var(--muted); margin: 0; }
.link-btn {
  pointer-events: auto;
  background: none; border: none; padding: 0;
  color: var(--accent); font: inherit; font-weight: 600;
  cursor: pointer; text-decoration: underline; text-underline-offset: 2px;
}
.link-btn:hover { color: var(--accent-ink); }

/* Seçim + dönüştür */
.selection {
  margin-top: 16px;
  padding: 14px 16px;
  background: var(--bg-sunken);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}
.file-count { margin: 0; font-size: 14.5px; color: var(--ink); font-weight: 500; }
.btn-primary {
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  padding: 12px 24px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s, transform .1s;
}
.btn-primary:hover { background: var(--accent-ink); }
.btn-primary:active { transform: translateY(1px); }
.btn-primary:disabled { opacity: .6; cursor: default; }

/* Durum mesajı */
.status {
  margin-top: 14px;
  padding: 13px 16px;
  border-radius: var(--radius-sm);
  font-size: 14.5px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.status.info { background: var(--accent-soft); color: var(--accent-ink); }
.status.ok   { background: var(--accent-soft); color: var(--accent-ink); }
.status.err  { background: var(--err-soft);    color: var(--err); }

.spinner {
  width: 17px; height: 17px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin .7s linear infinite;
  flex-shrink: 0;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* -------------------------------------------------------------- Sections --- */
.section { padding: 76px 0; }
.section + .section { border-top: 1px solid var(--line); }
.section-title {
  margin: 0 0 40px;
  font-size: 34px;
  line-height: 1.12;
  letter-spacing: -0.02em;
}
.section-lead {
  margin: -28px 0 40px;
  font-size: 17px;
  color: var(--muted);
  max-width: 34em;
}

/* 3 fark kartı */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.feature {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px 28px 32px;
  transition: border-color .15s, transform .15s;
}
.feature:hover { border-color: var(--line-strong); transform: translateY(-2px); }
.feature-num {
  display: inline-block;
  font-family: var(--serif);
  font-size: 15px;
  color: var(--accent);
  border: 1px solid var(--accent-soft);
  background: var(--accent-soft);
  width: 40px; height: 40px;
  line-height: 40px;
  text-align: center;
  border-radius: 50%;
  margin-bottom: 20px;
}
.feature h3 { margin: 0 0 9px; font-size: 20px; }
.feature p { margin: 0; color: var(--muted); font-size: 15px; }

/* Nasıl çalışır */
.how { background: var(--bg-sunken); }
.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}
.step { display: flex; gap: 18px; align-items: flex-start; }
.step-num {
  flex-shrink: 0;
  font-family: var(--serif);
  font-size: 22px;
  color: #fff;
  background: var(--accent);
  width: 44px; height: 44px;
  line-height: 44px;
  text-align: center;
  border-radius: 50%;
}
.step h3 { margin: 4px 0 6px; font-size: 19px; }
.step p { margin: 0; color: var(--muted); font-size: 15px; }

/* Örnek çıktı — sahte Excel tablosu */
.sheet {
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-card);
  box-shadow: 0 14px 40px -18px rgba(20,20,19,.18);
}
.sheet-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px 16px;
  background: var(--accent);
  color: #fff;
}
.sheet-name { font-size: 13.5px; font-weight: 600; letter-spacing: .01em; }
.sheet-scroll { overflow-x: auto; }
.sheet-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  min-width: 720px;
}
.sheet-table th, .sheet-table td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  border-right: 1px solid var(--line);
  white-space: nowrap;
}
.sheet-table th {
  background: var(--bg-sunken);
  font-weight: 600;
  color: var(--ink);
  font-size: 13px;
}
.sheet-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.sheet-table .corner, .sheet-table .rownum {
  background: var(--bg-sunken);
  color: var(--faint);
  text-align: center;
  font-size: 12.5px;
  width: 40px;
}
.sheet-table tbody tr:last-child td { border-bottom: none; }
.tag {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 600;
}
.tag.ok   { background: var(--accent-soft); color: var(--accent-ink); }
.tag.warn { background: var(--warn-soft);   color: var(--warn); }

/* SSS */
.faq-list {
  max-width: 760px;
  border-top: 1px solid var(--line);
}
.faq-list details {
  border-bottom: 1px solid var(--line);
}
.faq-list summary {
  list-style: none;
  cursor: pointer;
  padding: 22px 44px 22px 0;
  position: relative;
  font-family: var(--serif);
  font-size: 19px;
  color: var(--ink);
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after {
  content: "+";
  position: absolute;
  right: 6px; top: 50%;
  transform: translateY(-50%);
  font-family: var(--sans);
  font-size: 24px;
  font-weight: 300;
  color: var(--accent);
  transition: transform .2s;
}
.faq-list details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq-list details p {
  margin: 0;
  padding: 0 44px 24px 0;
  color: var(--muted);
  font-size: 15.5px;
}

/* Kapanış */
.closer { background: var(--ink); color: var(--bg); }
.closer-inner { text-align: center; }
.closer h2 {
  margin: 0 0 12px;
  font-size: 40px;
  letter-spacing: -0.02em;
  color: var(--bg);
}
.closer p { margin: 0 0 32px; color: #b7b4ac; font-size: 18px; }
.btn-ghost {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  padding: 14px 30px;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 600;
  transition: background .15s;
}
.btn-ghost:hover { background: var(--accent-ink); }

/* ---------------------------------------------------------------- Footer --- */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 30px 0;
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.site-footer p { margin: 0; color: var(--faint); font-size: 14px; }

/* ---------------------------------------------------- Header oturum alanı --- */
.auth-area { display: flex; align-items: center; }
.auth-guest, .auth-user { display: flex; align-items: center; gap: 14px; }
.btn-sm {
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 8px 16px;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s;
}
.btn-sm:hover { background: var(--accent-ink); }
.usage-badge {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--accent-ink);
  background: var(--accent-soft);
  padding: 5px 11px;
  border-radius: 999px;
  white-space: nowrap;
}
.user-email { font-size: 14px; color: var(--muted); max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* --------------------------------------------------------------- Fiyatlar --- */
.pricing { background: var(--bg-sunken); }
.plans {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  align-items: start;
}
.plan {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
}
.plan-featured {
  border-color: var(--accent);
  box-shadow: 0 14px 40px -18px rgba(33,115,70,.35);
}
.plan-tag {
  position: absolute;
  top: -12px; left: 50%;
  transform: translateX(-50%);
  background: var(--accent);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 14px;
  border-radius: 999px;
}
.plan-name { margin: 0 0 6px; font-size: 21px; }
.plan-price { margin: 0 0 4px; }
.plan-price .amount { font-family: var(--serif); font-size: 40px; color: var(--ink); }
.plan-price .per { font-size: 15px; color: var(--muted); }
.plan-quota { margin: 0 0 20px; font-size: 15px; color: var(--muted); }
.plan-quota strong { color: var(--accent-ink); }
.plan-list { list-style: none; margin: 0 0 26px; padding: 0; display: grid; gap: 10px; flex: 1; }
.plan-list li {
  position: relative;
  padding-left: 26px;
  font-size: 14.5px;
  color: var(--ink);
}
.plan-list li::before {
  content: "✓";
  position: absolute; left: 0; top: 0;
  color: var(--accent);
  font-weight: 700;
}
.btn-plan {
  background: var(--bg-card);
  color: var(--accent-ink);
  border: 1px solid var(--accent);
  border-radius: var(--radius-sm);
  padding: 12px;
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s, color .15s;
}
.btn-plan:hover { background: var(--accent-soft); }
.btn-plan-featured { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn-plan-featured:hover { background: var(--accent-ink); color: #fff; }
.pricing-note {
  margin: 32px 0 0;
  text-align: center;
  font-size: 14px;
  color: var(--faint);
}

/* ------------------------------------------------------------------ Modal --- */
.modal { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(20,20,19,.5); }
.modal-card {
  position: relative;
  width: min(92vw, 420px);
  background: var(--bg-card);
  border-radius: var(--radius);
  /* Üst boşluk geniş: çarpı köşede dururken sekmeler net bir aralıkla altında. */
  padding: 56px 32px 30px;
  box-shadow: 0 30px 70px -20px rgba(20,20,19,.4);
}
.modal-close {
  position: absolute; top: 8px; right: 8px;
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  background: none; border: none;
  font-size: 30px; line-height: 1; color: var(--faint);
  border-radius: 9px; cursor: pointer;
  transition: background .15s, color .15s;
}
.modal-close:hover { background: var(--bg-sunken); color: var(--ink); }
.modal-tabs {
  display: flex;
  gap: 4px;
  background: var(--bg-sunken);
  border-radius: var(--radius-sm);
  padding: 4px;
  margin-bottom: 24px;
}
.modal-tab {
  flex: 1;
  background: none; border: none;
  padding: 9px;
  font: inherit; font-size: 14.5px; font-weight: 600;
  color: var(--muted);
  border-radius: 7px;
  cursor: pointer;
}
.modal-tab.is-active { background: var(--bg-card); color: var(--ink); box-shadow: 0 1px 2px rgba(20,20,19,.08); }
.modal-heading { margin: 0 0 20px; font-size: 22px; }
.auth-form { display: flex; flex-direction: column; }
.auth-form label {
  display: flex; flex-direction: column;
  font-size: 13px; font-weight: 600; color: var(--muted);
  margin-bottom: 14px; gap: 6px;
}
.auth-form input {
  font: inherit; font-size: 15px; color: var(--ink);
  padding: 11px 13px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--bg);
}
.auth-form input:focus { outline: none; border-color: var(--accent); background: var(--bg-card); }
.btn-block { width: 100%; }
.form-err {
  margin: 0 0 14px;
  padding: 10px 13px;
  background: var(--err-soft); color: var(--err);
  border-radius: var(--radius-sm);
  font-size: 14px;
}
.form-note { margin: 14px 0 0; text-align: center; font-size: 13px; color: var(--faint); }
.form-desc { margin: 0 0 18px; font-size: 14.5px; color: var(--muted); line-height: 1.5; }
.form-desc strong { color: var(--ink); }
.form-link {
  display: block;
  margin: 14px auto 0;
  text-align: center;
  font-size: 13.5px;
}
/* OTP kod girişi: geniş, ortalı, aralıklı */
#otp-code, #reset-otp {
  text-align: center;
  font-size: 22px;
  letter-spacing: 8px;
  font-variant-numeric: tabular-nums;
}

/* ------------------------------------------------------------ Responsive --- */
@media (max-width: 900px) {
  .hero { padding: 56px 0 64px; }
  .hero-grid { grid-template-columns: 1fr; gap: 44px; }
  .hero-copy h1 { font-size: 48px; }
  .features-grid, .steps, .plans { grid-template-columns: 1fr; }
  .steps { gap: 24px; }
  .plan-featured { order: -1; }
}
@media (max-width: 620px) {
  .wrap { padding: 0 20px; }
  .header-nav { display: none; }
  .hero-copy h1 { font-size: 40px; }
  .hero .lead { font-size: 17px; }
  .section { padding: 56px 0; }
  .section-title { font-size: 28px; }
  .closer h2 { font-size: 30px; }
  .selection { justify-content: stretch; }
  .btn-primary { flex: 1; }
}
