/* SPDX-License-Identifier: AGPL-3.0-only */
/* Copyright (C) 2025-2026 DIY Accounting Ltd */

/* gateway.css — Minimal subset of submit.css for the corporate gateway */

/* ============================================================
   Design Tokens (CSS Custom Properties)
   ============================================================ */

:root {
  /* Brand */
  --color-brand-primary: #2c5aa0;
  --color-brand-primary-dark: #1e3f73;

  /* Text */
  --color-text-primary: #333;
  --color-text-secondary: #666;
  --color-text-muted: #737373;
  --color-text-inverse: #fff;

  /* UI */
  --color-background: #f9f9f9;
  --color-surface: #fff;
  --color-border: #ddd;

  /* Focus (WCAG 2.1 AA) */
  --color-focus: #005ea5;
  --color-focus-ring: rgba(0, 94, 165, 0.3);

  /* Typography */
  --font-family-base: Arial, sans-serif;
  --font-size-base: 1em;
  --font-weight-normal: 400;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;
  --line-height-normal: 1.5;

  /* Spacing */
  --spacing-sm: 0.5em;
  --spacing-md: 1em;
  --spacing-lg: 1.5em;
  --spacing-xl: 2em;

  /* Border Radius */
  --radius-md: 6px;
  --radius-lg: 8px;

  /* Shadows */
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 2px 10px rgba(0, 0, 0, 0.1);

  /* Layout */
  --max-width-content: 800px;
}

/* ============================================================
   Reset
   ============================================================ */

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* ============================================================
   Skip Link (WCAG 2.1 AA: 2.4.1 Bypass Blocks)
   ============================================================ */

.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: #000;
  color: #fff;
  padding: 8px;
  z-index: 100;
  text-decoration: underline;
}
.skip-link:focus {
  top: 0;
}

/* ============================================================
   Links (WCAG 2.1 AA: distinguishable by more than colour)
   ============================================================ */

p a,
li a,
address a,
.footer-content a {
  text-decoration: underline;
}

/* ============================================================
   Focus Styles (WCAG 2.1 AA: 2.4.7 Focus Visible)
   ============================================================ */

a:focus,
button:focus,
[tabindex]:focus {
  outline: 3px solid var(--color-focus);
  outline-offset: 2px;
}

.gateway-btn:focus {
  outline: 3px solid var(--color-focus);
  outline-offset: 2px;
  box-shadow: 0 0 0 3px var(--color-focus-ring);
}

/* ============================================================
   Base
   ============================================================ */

html,
body {
  height: 100%;
}

body {
  font-family: var(--font-family-base);
  background-color: var(--color-background);
  color: var(--color-text-primary);
  display: flex;
  flex-direction: column;
  padding: var(--spacing-md);
  max-width: var(--max-width-content);
  margin: 0 auto;
}

h1 {
  font-size: 2.2em;
  color: var(--color-brand-primary);
  margin-bottom: 0.5em;
  font-weight: var(--font-weight-bold);
  text-align: center;
}

h2 {
  font-size: 1.3em;
  color: var(--color-brand-primary);
  margin-top: 0;
  margin-bottom: 0.75rem;
}

p {
  line-height: var(--line-height-normal);
  margin-bottom: var(--spacing-md);
}

main {
  flex: 1;
}

/* ============================================================
   Gateway Buttons
   ============================================================ */

.gateway-buttons {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-lg);
  margin: var(--spacing-xl) 0;
}

.gateway-btn {
  display: block;
  text-decoration: none;
  background: var(--color-surface);
  border: 2px solid var(--color-brand-primary);
  border-radius: var(--radius-lg);
  padding: var(--spacing-lg) var(--spacing-xl);
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s, border-color 0.2s, background-color 0.2s;
  color: var(--color-text-primary);
}

.gateway-btn:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--color-brand-primary-dark);
  background-color: rgba(44, 90, 160, 0.04);
}

.gateway-btn .btn-title {
  display: block;
  font-size: 1.3em;
  font-weight: var(--font-weight-bold);
  color: var(--color-brand-primary);
  margin-bottom: 0.4em;
}

.gateway-btn .btn-subtitle {
  display: block;
  font-size: 0.95em;
  color: var(--color-text-secondary);
  line-height: 1.4;
}

/* ============================================================
   Company Summary (index.html)
   ============================================================ */

.company-summary {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: var(--spacing-lg) var(--spacing-xl);
  margin-top: var(--spacing-xl);
}

.company-summary p:last-child {
  margin-bottom: 0;
}

/* ============================================================
   Company Page (about.html)
   ============================================================ */

.company-section {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: var(--spacing-lg);
  margin-bottom: var(--spacing-lg);
}

.company-section p {
  color: var(--color-text-primary);
  line-height: 1.6;
}

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

.directors-list {
  list-style: none;
  padding: 0;
  margin: 0.75rem 0;
}

.directors-list li {
  padding: 0.25rem 0;
  line-height: var(--line-height-normal);
}

.directors-list li strong {
  color: var(--color-brand-primary);
}

details {
  margin-top: 0.75rem;
}

details summary {
  cursor: pointer;
  color: var(--color-brand-primary);
  font-weight: var(--font-weight-semibold);
  padding: 0.5rem 0;
  user-select: none;
}

details summary:hover {
  text-decoration: underline;
}

details[open] summary {
  margin-bottom: 0.5rem;
}

.contact-section {
  background: #f8f9fa;
  border-radius: var(--radius-lg);
  padding: var(--spacing-lg);
}

.contact-section h2 {
  color: var(--color-brand-primary);
  margin-top: 0;
  margin-bottom: 0.75rem;
}

.contact-details {
  line-height: 1.8;
}

.contact-details p {
  margin: 0 0 0.75rem 0;
}

.contact-details .address {
  font-style: normal;
}

.contact-details .company-reg {
  color: var(--color-text-secondary);
  font-size: 0.9rem;
  margin-top: 1rem;
}

/* ============================================================
   Footer
   ============================================================ */

footer {
  margin-top: var(--spacing-xl);
  font-size: 0.9em;
  color: var(--color-text-muted);
  padding-top: var(--spacing-md);
  border-top: 1px solid #eee;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-left {
  flex: 1;
  text-align: left;
}

.footer-center {
  flex: 2;
  text-align: center;
}

.footer-left a {
  color: var(--color-brand-primary);
  text-decoration: none;
  font-size: 0.85em;
  transition: color 0.3s;
  display: inline-block;
  min-height: 24px;
  padding: 4px 0;
  line-height: 1.2;
}

.footer-left a:hover {
  color: var(--color-brand-primary-dark);
  text-decoration: underline;
}

/* ============================================================
   Responsive (600px breakpoint)
   ============================================================ */

@media (max-width: 600px) {
  body {
    padding: 0.5em;
  }

  h1 {
    font-size: 1.8em;
  }

  .gateway-btn {
    padding: var(--spacing-md) var(--spacing-lg);
  }

  .gateway-btn .btn-title {
    font-size: 1.1em;
  }
}
