/* ==========================================================================
   Immich SaaS — Design System
   Konzept A: "Ein ruhiger Ort für deine Fotos"
   ========================================================================== */

/* --- 1. Design Tokens --- */
:root {
  --color-bg:      #F4EFE6;
  --color-surface: #FBF7EF;
  --color-text:    #1F1B16;
  --color-muted:   #6B6458;
  --color-accent:  #C97B5A;
  --color-border:  #E4DDD0;

  --font-serif: 'Instrument Serif', Georgia, serif;
  --font-sans:  'Inter', system-ui, sans-serif;
  --font-mono:  'JetBrains Mono', ui-monospace, monospace;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 12px;

  --shadow-soft: 0 2px 12px rgba(31, 27, 22, 0.06);
  --shadow-medium: 0 8px 30px rgba(31, 27, 22, 0.10);
  --shadow-deep: 0 30px 80px rgba(31, 27, 22, 0.15);
}

/* --- 2. Base Overrides --- */
html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.65;
}

h1, h2, h3 {
  font-family: var(--font-serif);
  font-weight: 400;
  line-height: 1.2;
  color: var(--color-text);
}

a {
  color: var(--color-accent);
  transition: color 0.2s ease;
}

a:hover {
  color: var(--color-text);
}

section[id] {
  scroll-margin-top: 4rem;
}

/* --- 3. Bulma Color Class Overrides --- */

/* Primary button */
.button.is-primary {
  background-color: var(--color-accent);
  border-color: var(--color-accent);
  color: #fff;
  text-transform: none;
  border-radius: var(--radius-sm);
  font-weight: 500;
  font-family: var(--font-sans);
  transition: background-color 0.2s ease, box-shadow 0.2s ease;
}

.button.is-primary:hover {
  background-color: #B86A4A;
  border-color: #B86A4A;
  box-shadow: 0 4px 16px rgba(201, 123, 90, 0.25);
}

.button.is-primary strong {
  font-weight: 500;
}

/* Light button */
.button.is-light {
  background: var(--color-surface);
  color: var(--color-text);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-family: var(--font-sans);
  font-weight: 500;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

.button.is-light:hover {
  background: var(--color-bg);
  border-color: var(--color-muted);
}

/* Medium button sizing */
.button.is-medium {
  padding: 0.75rem 2rem;
  font-size: 1rem;
}

/* Success button (dashboard) */
.button.is-success {
  background-color: #4A8B5C;
  border-color: #4A8B5C;
  color: #fff;
  border-radius: var(--radius-sm);
  font-family: var(--font-sans);
}

.button.is-success:hover {
  background-color: #3D7A4E;
}

/* Warning button (dashboard) */
.button.is-warning {
  border-radius: var(--radius-sm);
  font-family: var(--font-sans);
}

/* Danger button (dashboard) */
.button.is-danger {
  border-radius: var(--radius-sm);
  font-family: var(--font-sans);
}

.button.is-danger.is-outlined {
  border-color: #C44;
  color: #C44;
}

.button.is-danger.is-outlined:hover {
  background-color: #C44;
  color: #fff;
}

/* Link button (dashboard) */
.button.is-link.is-light {
  background: var(--color-surface);
  color: var(--color-accent);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
}

.button.is-link.is-light:hover {
  background: var(--color-bg);
  border-color: var(--color-accent);
}

/* Text color helpers */
.has-text-primary {
  color: var(--color-accent) !important;
}

.has-text-grey {
  color: var(--color-muted) !important;
}

/* --- 4. Card Styles --- */
.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
}

.card-header {
  border-bottom: 1px solid var(--color-border);
  box-shadow: none;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.card-header-title {
  font-family: var(--font-sans);
  font-weight: 600;
  color: var(--color-text);
}

.card-content {
  color: var(--color-text);
}

/* Box override (used in pricing) */
.box {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
}

/* --- 5. Section Spacing --- */
.section {
  padding: 5rem 1.5rem;
}

/* --- 6. Navbar --- */
.navbar {
  background-color: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
  padding: 1rem 0;
  box-shadow: none;
}

.navbar.is-spaced {
  padding: 1rem 0;
}

.navbar-brand .navbar-item {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  color: var(--color-text);
  font-weight: 400;
}

.navbar-brand .navbar-item:hover {
  background: transparent;
  color: var(--color-text);
}

.navbar-item {
  font-family: var(--font-sans);
  color: var(--color-muted);
  font-size: 0.95rem;
  transition: color 0.2s ease;
}

.navbar-item:hover,
.navbar-item:focus {
  background-color: transparent !important;
  color: var(--color-text);
}

.navbar-menu {
  background-color: var(--color-bg);
  box-shadow: none;
}

.navbar-burger {
  color: var(--color-text);
}

.navbar-burger:hover {
  background-color: transparent;
  color: var(--color-accent);
}

/* --- 7. Footer --- */
.footer {
  background-color: var(--color-border);
  padding: 2rem 1.5rem;
}

.footer p,
.footer a {
  font-size: 0.85rem;
  color: var(--color-muted);
}

.footer a:hover {
  color: var(--color-text);
}

/* --- 8. Notifications --- */
.notification {
  border-radius: var(--radius-md);
  font-family: var(--font-sans);
}

.notification.is-info {
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  color: var(--color-text);
}

.notification.is-info.is-light {
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  color: var(--color-text);
}

/* --- 9. Hero Section --- */
.hero-custom {
  padding: 7rem 0 0;
  background: var(--color-bg);
}

.hero-text {
  max-width: 640px;
  margin: 0 auto;
  text-align: center;
}

.hero-custom h1 {
  font-size: clamp(2.4rem, 5vw, 4rem);
  margin-bottom: 1.25rem;
}

.hero-subtitle {
  font-size: 1.1rem;
  color: var(--color-muted);
  max-width: 520px;
  margin: 0 auto 2rem;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.hero-link {
  color: var(--color-muted);
  font-size: 0.95rem;
  text-decoration: none;
  border-bottom: 1px solid var(--color-border);
  transition: color 0.2s ease, border-color 0.2s ease;
}

.hero-link:hover {
  color: var(--color-text);
  border-color: var(--color-text);
}

.hero-trust {
  margin-top: 1.5rem;
  font-size: 0.8rem;
  color: var(--color-muted);
  letter-spacing: 0.02em;
}

.hero-screenshot {
  margin-top: 4rem;
  overflow: hidden;
}

.screenshot-frame {
  max-width: 900px;
  margin: 0 auto;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  overflow: hidden;
  box-shadow: 0 -4px 0 var(--color-border),
              var(--shadow-deep);
}

.screenshot-frame img {
  width: 100%;
  display: block;
}

/* --- 10. Feature Sections --- */

/* "Warum nicht Google Fotos?" prose section */
.section-prose {
  max-width: 680px;
  margin: 0 auto;
}

.section-prose h1 {
  font-size: clamp(2rem, 3.5vw, 2.75rem);
  margin-bottom: 1.5rem;
}

.section-prose h2 {
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  margin-top: 2.5rem;
  margin-bottom: 1rem;
}

.legal-prose h3 {
  margin-top: 1.5rem;
}

.legal-prose hr {
  border: none;
  border-top: 1px solid var(--color-border);
  margin: 2.5rem 0;
}

.section-prose p {
  font-size: 1.05rem;
  color: var(--color-muted);
  line-height: 1.8;
}

.section-prose h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-top: 2rem;
  margin-bottom: 0.5rem;
  color: var(--color-text);
}

.section-prose ul,
.section-prose ol {
  padding-left: 1.5rem;
  margin-bottom: 1rem;
  color: var(--color-muted);
  line-height: 1.8;
}

.section-prose li {
  margin-bottom: 0.25rem;
}

.section-prose .notice {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem;
  font-size: 0.95rem;
  color: var(--color-muted);
  margin-bottom: 2.5rem;
}

/* --- Plan-Karten (Pricing-Sektion + Dashboard ohne Subscription) --- */
.plan-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
  max-width: 960px;
  margin: 2rem auto 0;
}

.plan-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 1.75rem 1.5rem;
  display: flex;
  flex-direction: column;
}

.plan-card-header {
  margin-bottom: 1rem;
}

.plan-card-name {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0 0 0.25rem;
  color: var(--color-text);
}

.plan-card-quota {
  font-size: 0.95rem;
  color: var(--color-muted);
  margin: 0;
}

.plan-card-price {
  margin-bottom: 1rem;
}

.plan-card-price-amount {
  font-size: 1.75rem;
  font-weight: 600;
  color: var(--color-text);
}

.plan-card-price-interval {
  font-size: 0.95rem;
  color: var(--color-muted);
  margin-left: 0.25rem;
}

.plan-card-desc {
  font-size: 0.95rem;
  color: var(--color-muted);
  line-height: 1.55;
  margin-bottom: 1.5rem;
  flex-grow: 1;
}

.plan-card-cta {
  width: 100%;
  text-align: center;
  margin-top: auto;
}

.plan-card-secondary {
  display: block;
  text-align: center;
  margin-top: 0.75rem;
  font-size: 0.9rem;
  color: var(--color-muted);
}

.plan-cards-footnote {
  text-align: center;
  margin-top: 1.5rem;
  font-size: 0.9rem;
  color: var(--color-muted);
}

.plan-cards-empty {
  text-align: center;
  margin: 2rem auto;
  color: var(--color-muted);
  max-width: 480px;
}

.comparison-badges {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 1.5rem;
}

.badge {
  display: inline-block;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
}

.badge-no {
  background: #FEF2F0;
  color: #9B3B2A;
  border: 1px solid #FDDDD9;
}

.badge-yes {
  background: #F0F4F0;
  color: #2A6B2A;
  border: 1px solid #D5E8D5;
}

/* Alternating feature rows */
.section-title {
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  margin-bottom: 4rem;
}

.feature-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
  margin-bottom: 6rem;
}

.feature-row:last-child {
  margin-bottom: 0;
}

.feature-row-reverse {
  direction: rtl;
}

.feature-row-reverse > * {
  direction: ltr;
}

.feature-text h3 {
  font-size: 1.5rem;
  margin-bottom: 0.75rem;
}

.feature-text p {
  color: var(--color-muted);
  line-height: 1.8;
}

.feature-image img {
  width: 100%;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-medium);
}

.feature-image-mobile {
  max-width: 280px;
  margin: 0 auto;
}

/* Trust / "Unter der Haube" section */
.section-trust {
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}

.trust-block {
  max-width: 680px;
  margin: 0 auto;
  text-align: center;
}

.trust-block p {
  font-size: 1.05rem;
  color: var(--color-muted);
  margin-bottom: 2rem;
  line-height: 1.8;
}

.trust-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
}

.trust-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.85rem;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  font-size: 0.85rem;
  color: var(--color-muted);
  background: var(--color-bg);
}

/* --- 11. Pricing & FAQ --- */
.section-header {
  margin-bottom: 3rem;
}

.section-lead {
  font-size: 1.05rem;
  color: var(--color-muted);
  margin-top: 0.5rem;
}

.faq-list {
  margin-top: 2rem;
}

.faq-item {
  padding: 1.5rem 0;
  border-top: 1px solid var(--color-border);
}

.faq-item:last-child {
  border-bottom: 1px solid var(--color-border);
}

.faq-item h4 {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 1rem;
  margin-bottom: 0.4rem;
  color: var(--color-text);
}

.faq-item p {
  color: var(--color-muted);
  font-size: 0.95rem;
  line-height: 1.7;
  margin: 0;
}

.faq-item a {
  color: var(--color-accent);
  text-decoration: none;
  border-bottom: 1px solid currentColor;
}

.faq-item a:hover {
  color: var(--color-text);
}

/* --- 12. Form Styles (Auth pages) --- */
.form-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  max-width: 440px;
  margin: 4rem auto;
}

.input,
.select select,
.textarea {
  background: var(--color-bg);
  border-color: var(--color-border);
  color: var(--color-text);
  border-radius: var(--radius-sm);
  font-family: var(--font-sans);
}

.input:focus,
.select select:focus,
.textarea:focus {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 2px rgba(201, 123, 90, 0.15);
}

.input::placeholder {
  color: #B0A99C;
}

.label {
  color: var(--color-text);
  font-weight: 500;
  font-size: 0.9rem;
  font-family: var(--font-sans);
}

/* Auth page titles */
.card .title,
.form-card .title {
  font-family: var(--font-serif);
  font-weight: 400;
}

/* Auth help links */
.help a {
  color: var(--color-accent);
  text-decoration: none;
}

.help a:hover {
  color: var(--color-text);
}

/* Signup hint */
.auth-hint {
  text-align: center;
  font-size: 0.85rem;
  color: var(--color-muted);
  margin-top: 1rem;
}

/* --- 13. Dashboard --- */
.dashboard-title {
  font-family: var(--font-serif);
  font-weight: 400;
}

/* Status dot (Phase 2) */
.status-inline {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}

.status-dot--running {
  background: #2A6B2A;
  box-shadow: 0 0 0 3px rgba(42, 107, 42, 0.15);
}

.status-dot--stopped {
  background: #9B3B2A;
  box-shadow: 0 0 0 3px rgba(155, 59, 42, 0.15);
}

.status-dot--warn {
  background: #C99A5A;
  box-shadow: 0 0 0 3px rgba(201, 154, 90, 0.15);
}

.status-dot--not_provisioned {
  background: var(--color-muted);
  box-shadow: 0 0 0 4px rgba(0,0,0,0.05);
}

.status-label {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--color-muted);
}

.status-label--running { color: #2A6B2A; }
.status-label--stopped { color: #9B3B2A; }
.status-label--warn    { color: #8B6914; }

/* Dashboard grid cards */
.dashboard-card-title {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-muted);
  margin-bottom: 0.75rem;
}

/* Access card */
.instance-url {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  color: var(--color-text);
  word-break: break-all;
}

.copy-btn {
  background: none;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 0.25rem 0.5rem;
  cursor: pointer;
  color: var(--color-muted);
  transition: border-color 0.2s, color 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.8rem;
}

.copy-btn:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
}

/* Coming-Soon Pattern (Phase 6) */
.coming-soon-badge {
  display: inline-block;
  padding: 0.15em 0.6em;
  border-radius: 999px;
  background: var(--color-surface);
  color: var(--color-accent);
  border: 1px solid var(--color-border);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  vertical-align: middle;
  margin-left: 0.5rem;
}

.card--coming-soon .card-content {
  opacity: 0.7;
}

.card--coming-soon .button[disabled],
.card--coming-soon button[disabled] {
  cursor: not-allowed;
  pointer-events: none;
}

/* Danger Zone */
.card--danger-zone {
  border: 1px solid var(--color-accent);
}

.card--danger-zone .card-header-title {
  color: var(--color-accent);
}

/* Storage progress */
.storage-bar-wrap {
  background: var(--color-border);
  border-radius: 999px;
  height: 8px;
  overflow: hidden;
  margin: 0.75rem 0;
}

.storage-bar-fill {
  height: 100%;
  border-radius: 999px;
  background: var(--color-accent);
  transition: width 0.4s ease;
}

.storage-bar-fill--warn { background: var(--color-accent); }
.storage-bar-fill--crit { background: #9B3B2A; }

/* Controls card */
.controls-hint {
  font-size: 0.8rem;
  color: var(--color-muted);
  margin-bottom: 0.75rem;
}

/* Tags override */
.tag.is-success {
  background-color: #D5E8D5;
  color: #2A6B2A;
}

.tag.is-danger {
  background-color: #FEF2F0;
  color: #9B3B2A;
}

.tag.is-warning {
  background-color: #FFF5E6;
  color: #8B6914;
}

/* Progress bar override */
.progress.is-primary {
  color: var(--color-accent);
}

.progress.is-primary::-webkit-progress-value {
  background-color: var(--color-accent);
}

.progress.is-primary::-moz-progress-bar {
  background-color: var(--color-accent);
}

/* Table overrides (dashboard) */
.table {
  background: var(--color-surface);
  color: var(--color-text);
}

.table th {
  color: var(--color-muted);
  border-color: var(--color-border);
  font-weight: 600;
  font-size: 0.85rem;
}

.table td {
  border-color: var(--color-border);
}

.table.is-hoverable tbody tr:hover {
  background-color: var(--color-bg);
}

.table.is-striped tbody tr:nth-child(even) {
  background-color: var(--color-bg);
}

/* --- 13b. So läuft's ab — Steps --- */
.section-steps {
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}

.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.5rem;
  max-width: 860px;
  margin: 0 auto;
}

.step-item {
  text-align: center;
}

.step-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  color: var(--color-accent);
  margin-bottom: 1rem;
}

.step-number {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: 0.4rem;
}

.step-title {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  margin-bottom: 0.5rem;
  color: var(--color-text);
}

.step-desc {
  font-size: 0.9rem;
  color: var(--color-muted);
  line-height: 1.7;
}

/* --- 14. Responsive --- */
@media (max-width: 768px) {
  .hero-custom {
    padding: 4rem 0 0;
  }

  .hero-custom h1 {
    font-size: clamp(2rem, 7vw, 2.8rem);
  }

  .hero-screenshot {
    display: none;
  }

  .feature-row {
    grid-template-columns: 1fr;
    direction: ltr;
    gap: 2rem;
    margin-bottom: 3rem;
  }

  .feature-row-reverse {
    direction: ltr;
  }

  .feature-image-mobile {
    max-width: 220px;
  }

  .section {
    padding: 3rem 1.5rem;
  }

  .trust-badges {
    flex-direction: column;
    align-items: center;
  }

  .steps-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

}

@media (min-width: 769px) and (max-width: 1024px) {
  .feature-row {
    gap: 2.5rem;
  }
}

/* --- 15. Pricing page standalone --- */
.pricing-section {
  padding: 3rem 1.5rem;
}


/* --- 16. Checkbox override --- */
.checkbox {
  color: var(--color-text);
  font-family: var(--font-sans);
  font-size: 0.9rem;
}

/* --- 17. Content area links (Bulma .content) --- */
.content a {
  color: var(--color-accent);
}

.content a:hover {
  color: var(--color-text);
}
