/* ============================================================
   GreenWind Holding — Design System
   Style: Editorial Institutional (annual report aesthetic)
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,300;1,9..40,400;1,9..40,500&display=swap');

/* ============ DESIGN TOKENS ============ */
:root {
  /* Colors — paper + sage palette */
  --bg-paper:        #F8F6F1;    /* warm off-white */
  --bg-card:         #FFFFFF;
  --bg-subtle:       #F0EEE6;    /* warm beige */
  --bg-sage:         #EDF1EA;    /* very pale sage (eco hint) */
  --bg-sage-deep:    #DCE3D6;    /* slightly deeper sage */
  --bg-darker:       #E5E2D6;

  /* Ink (text) — slightly green-tinted darks for cohesion */
  --ink-primary:     #0F1B14;    /* near-black with green undertone */
  --ink-secondary:   #3D4A41;    /* warm green-gray */
  --ink-muted:       #7A867D;    /* sage gray */
  --ink-faint:       #B5BDB6;    /* light sage gray */

  /* Brand — green-dominant palette */
  --brand-forest:    #1B4332;    /* deep forest green — primary */
  --brand-forest-mid:#2D6048;    /* mid forest */
  --brand-moss:      #52796F;    /* moss/teal accent */
  --brand-sage:      #84A98C;    /* sage — lighter accent */
  --brand-olive:     #606C38;    /* olive — secondary accent */
  --brand-bark:      #574C3F;    /* warm bark brown — neutral */
  --brand-burgundy:  #7C2D12;    /* deep burgundy — reserved for negative values only */
  --brand-amber:     #92400E;    /* warning, very sparingly */

  /* Charts — green-led palette with earth tones */
  --chart-1: #1B4332;            /* forest (primary) */
  --chart-2: #52796F;            /* moss */
  --chart-3: #606C38;            /* olive */
  --chart-4: #84A98C;            /* sage */
  --chart-5: #574C3F;            /* bark */
  --chart-6: #2D6048;            /* forest mid */
  --chart-7: #7C2D12;            /* burgundy (negative only) */
  --chart-8: #B5BDB6;            /* light sage gray */

  /* Lines */
  --hairline:        #E0DCD0;    /* warm hairline */
  --rule:            #D2CDBE;
  --rule-strong:     #B8B2A0;

  /* Typography — single family for maximum coherence */
  --font-body:       'DM Sans', system-ui, sans-serif;
  --font-display:    var(--font-body);   /* alias */
  --font-mono:       var(--font-body);   /* alias — tabular-nums activated where needed */

  /* Spacing scale */
  --sp-1: 4px;   --sp-2: 8px;    --sp-3: 12px;
  --sp-4: 16px;  --sp-5: 24px;   --sp-6: 32px;
  --sp-7: 48px;  --sp-8: 64px;   --sp-9: 96px;

  /* Layout */
  --sidebar-w:       240px;
  --content-max:     1440px;
  --header-h:        64px;
}

/* ============ RESET ============ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
body {
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink-primary);
  background: var(--bg-paper);
  font-feature-settings: 'ss01', 'cv11';  /* DM Sans alternates */
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
ul { list-style: none; }
img { max-width: 100%; display: block; }

/* ============ TYPOGRAPHY ============ */
.display-xl {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  line-height: 1.05;
  letter-spacing: -0.035em;
}
.display-lg {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.1;
  letter-spacing: -0.03em;
}
.display-md {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 1.75rem;
  line-height: 1.2;
  letter-spacing: -0.02em;
}
.display-sm {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 1.25rem;
  line-height: 1.3;
  letter-spacing: -0.015em;
}
.label-tiny {
  font-family: var(--font-body);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-muted);
}
.label-small {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-secondary);
}
.body-base {
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink-secondary);
}
.body-sm {
  font-size: 13px;
  line-height: 1.55;
  color: var(--ink-secondary);
}
.num {
  font-feature-settings: 'tnum' 1;
  font-variant-numeric: tabular-nums;
}
.num-display {
  font-family: var(--font-body);
  font-weight: 500;
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
  font-feature-settings: 'tnum' 1;
}

/* ============ LAYOUT ============ */
.app-shell {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  min-height: 100vh;
}

.sidebar {
  background: var(--bg-card);
  border-right: 1px solid var(--hairline);
  padding: var(--sp-6) 0;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.sidebar__brand {
  padding: 0 var(--sp-5) var(--sp-6);
  border-bottom: 1px solid var(--hairline);
  margin-bottom: var(--sp-5);
}
.sidebar__brand-mark {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1.1rem;
  letter-spacing: -0.02em;
  color: var(--ink-primary);
  margin-bottom: var(--sp-1);
  display: flex;
  align-items: baseline;
  gap: 6px;
}
.sidebar__brand-mark::before {
  content: '';
  width: 8px; height: 8px;
  background: var(--brand-forest);
  border-radius: 50%;
  display: inline-block;
  margin-right: 2px;
  transform: translateY(-1px);
  box-shadow: 0 0 0 3px var(--bg-sage-deep);
}
.sidebar__brand-sub {
  font-size: 11px;
  color: var(--ink-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 500;
}

.nav-section { padding: 0 var(--sp-3); }
.nav-section + .nav-section { margin-top: var(--sp-5); }
.nav-section__title {
  padding: 0 var(--sp-3);
  margin-bottom: var(--sp-2);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-muted);
}
.nav-item {
  display: flex;
  align-items: center;
  padding: var(--sp-2) var(--sp-3);
  font-size: 14px;
  color: var(--ink-secondary);
  border-radius: 4px;
  transition: all 0.15s ease;
  margin-bottom: 1px;
  font-weight: 400;
}
.nav-item:hover { background: var(--bg-subtle); color: var(--ink-primary); }
.nav-item--active {
  background: var(--bg-subtle);
  color: var(--ink-primary);
  font-weight: 500;
  position: relative;
}
.nav-item--active::before {
  content: '';
  position: absolute;
  left: -8px;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 18px;
  background: var(--brand-forest);
  border-radius: 0 2px 2px 0;
}
.nav-item--disabled {
  color: var(--ink-faint);
  cursor: not-allowed;
}
.nav-item__badge {
  margin-left: auto;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--ink-faint);
  text-transform: uppercase;
}

.main {
  min-width: 0;  /* prevent overflow in grid */
  background: var(--bg-paper);
}

.topbar {
  height: var(--header-h);
  border-bottom: 1px solid var(--hairline);
  background: var(--bg-paper);
  display: flex;
  align-items: center;
  padding: 0 var(--sp-7);
  gap: var(--sp-5);
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(8px);
  background: rgba(250, 249, 246, 0.92);
}
.topbar__title {
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: -0.015em;
}
.topbar__crumb {
  font-size: 12px;
  color: var(--ink-muted);
  letter-spacing: 0.02em;
}
.topbar__crumb::before { content: '/ '; color: var(--ink-faint); margin: 0 6px; }
.topbar__actions { margin-left: auto; display: flex; gap: var(--sp-3); align-items: center; }
.topbar__select {
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--ink-primary);
  background: var(--bg-card);
  border: 1px solid var(--hairline);
  padding: 6px 10px;
  border-radius: 4px;
  outline: none;
  cursor: pointer;
}
.topbar__select:focus { border-color: var(--brand-forest); }

.content {
  padding: var(--sp-7) var(--sp-7);
  max-width: var(--content-max);
}
.content--wide { max-width: 100%; padding: var(--sp-7) var(--sp-6); }

/* ============ PAGE HEADER ============ */
.page-header {
  margin-bottom: var(--sp-7);
  padding-bottom: var(--sp-5);
  border-bottom: 1px solid var(--rule);
}
.page-header__eyebrow {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brand-forest);
  margin-bottom: var(--sp-3);
}
.page-header__title {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 2.5rem;
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: var(--ink-primary);
  margin-bottom: var(--sp-3);
  max-width: 720px;
}
.page-header__lead {
  font-size: 17px;
  line-height: 1.55;
  color: var(--ink-secondary);
  max-width: 680px;
  font-weight: 300;
}

/* ============ CARDS ============ */
.card {
  background: var(--bg-card);
  border: 1px solid var(--hairline);
  border-radius: 4px;
  padding: var(--sp-5);
}
.card__title {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: var(--sp-2);
}
.card__value {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 2rem;
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--ink-primary);
  font-variant-numeric: tabular-nums;
  font-feature-settings: 'tnum' 1;
}
.card__unit {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.75em;
  font-weight: 400;
  color: var(--ink-muted);
  letter-spacing: 0;
  margin-left: 4px;
}
.card__sub {
  margin-top: var(--sp-3);
  font-size: 12px;
  color: var(--ink-secondary);
  display: flex;
  align-items: center;
  gap: var(--sp-2);
}
.card__delta {
  font-weight: 500;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}
.card__delta--pos { color: var(--brand-forest); }
.card__delta--neg { color: var(--brand-burgundy); }
.card__delta--neutral { color: var(--ink-muted); }

/* ============ SECTION HEADERS ============ */
.section {
  margin-top: var(--sp-7);
  margin-bottom: var(--sp-5);
}
.section__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: var(--sp-4);
  padding-bottom: var(--sp-3);
  border-bottom: 1px solid var(--hairline);
}
.section__title {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
}
.section__desc {
  font-size: 13px;
  color: var(--ink-muted);
}

/* ============ KPI GRID ============ */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1px;
  background: var(--hairline);
  border: 1px solid var(--hairline);
  border-radius: 4px;
  overflow: hidden;
}
.kpi-grid .card {
  border: none;
  border-radius: 0;
}

/* ============ CHART CONTAINER ============ */
.chart-card {
  background: var(--bg-card);
  border: 1px solid var(--hairline);
  border-radius: 4px;
  padding: var(--sp-5);
}
.chart-card__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: var(--sp-4);
}
.chart-card__title {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: -0.015em;
}
.chart-card__sub {
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-muted);
  font-weight: 500;
}
.chart-container {
  width: 100%;
  height: 320px;
}
.chart-container--tall { height: 420px; }
.chart-container--short { height: 240px; }

/* ============ TABLES ============ */
.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.table th {
  text-align: left;
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-muted);
  padding: var(--sp-3) var(--sp-4);
  border-bottom: 1px solid var(--rule);
  background: var(--bg-subtle);
}
.table th.num { text-align: right; }
.table td {
  padding: var(--sp-3) var(--sp-4);
  border-bottom: 1px solid var(--hairline);
  color: var(--ink-primary);
}
.table td.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.table td.label { font-weight: 500; color: var(--ink-primary); }
.table td.muted { color: var(--ink-secondary); }
.table tr:last-child td { border-bottom: none; }
.table tr.total td {
  font-weight: 600;
  background: var(--bg-subtle);
  border-top: 1px solid var(--rule-strong);
  border-bottom: 1px solid var(--rule-strong);
}
.table tr.subtotal td {
  font-weight: 500;
  border-top: 1px solid var(--rule);
  background: rgba(244, 242, 236, 0.5);
}

/* ============ INTRO / HOMEPAGE ============ */
.hero {
  padding: var(--sp-9) var(--sp-7) var(--sp-8);
  max-width: var(--content-max);
}
.hero__meta {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  margin-bottom: var(--sp-5);
}
.hero__chip {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border: 1px solid var(--rule);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-secondary);
}
.hero__chip--accent {
  border-color: var(--brand-forest);
  color: var(--brand-forest);
  background: var(--bg-sage);
}
.hero__chip--accent::before {
  content: '';
  width: 6px; height: 6px;
  background: var(--brand-forest);
  border-radius: 50%;
  display: inline-block;
  margin-right: 8px;
  transform: translateY(-1px);
}
.hero__title {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: clamp(2.75rem, 5.5vw, 4.5rem);
  line-height: 1.05;
  letter-spacing: -0.035em;
  color: var(--ink-primary);
  margin-bottom: var(--sp-5);
  max-width: 1000px;
}
.hero__title em {
  font-style: italic;
  font-weight: 400;
  color: var(--brand-forest);
}
.hero__lead {
  font-size: clamp(1.05rem, 1.5vw, 1.25rem);
  line-height: 1.55;
  color: var(--ink-secondary);
  max-width: 720px;
  font-weight: 300;
  margin-bottom: var(--sp-7);
}
.hero__rule {
  height: 1px;
  background: var(--rule);
  margin: var(--sp-7) 0;
}

/* Group at a glance — homepage strip */
.glance-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--hairline);
  border: 1px solid var(--hairline);
  margin-bottom: var(--sp-7);
}
.glance-strip__cell {
  background: var(--bg-card);
  padding: var(--sp-5) var(--sp-5);
  display: flex;
  flex-direction: column;
}
.glance-strip__label {
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-muted);
  font-weight: 600;
  margin-bottom: var(--sp-3);
}
.glance-strip__value {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 1.75rem;
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--ink-primary);
  font-variant-numeric: tabular-nums;
  font-feature-settings: 'tnum' 1;
  margin-bottom: var(--sp-2);
}
.glance-strip__sub {
  font-size: 12px;
  color: var(--ink-secondary);
}

/* Section grid for homepage cards (link to other pages) */
.intent-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--sp-5);
  margin-top: var(--sp-6);
}
.intent-card {
  background: var(--bg-card);
  border: 1px solid var(--hairline);
  padding: var(--sp-6) var(--sp-5);
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  min-height: 200px;
  position: relative;
  overflow: hidden;
}
.intent-card::after {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 2px;
  background: var(--brand-forest);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}
.intent-card:hover {
  border-color: var(--brand-forest);
  background: var(--bg-sage);
}
.intent-card:hover::after { transform: scaleX(1); }
.intent-card__num {
  font-size: 11px;
  color: var(--ink-faint);
  letter-spacing: 0.08em;
  margin-bottom: var(--sp-4);
  font-variant-numeric: tabular-nums;
  font-weight: 500;
}
.intent-card__title {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1.2rem;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin-bottom: var(--sp-3);
  color: var(--ink-primary);
}
.intent-card__desc {
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--ink-secondary);
  margin-bottom: var(--sp-4);
  flex: 1;
}
.intent-card__cta {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--brand-forest);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.intent-card__cta::after {
  content: '→';
  transition: transform 0.2s ease;
}
.intent-card:hover .intent-card__cta::after {
  transform: translateX(3px);
}
.intent-card--disabled {
  opacity: 0.5;
  pointer-events: none;
}
.intent-card--disabled .intent-card__cta {
  color: var(--ink-muted);
}
.intent-card--disabled .intent-card__cta::after { content: '· coming'; }

/* Fleet visualization on homepage */
.fleet-card {
  background: var(--bg-sage);
  border: 1px solid var(--hairline);
  padding: var(--sp-6);
  margin-top: var(--sp-7);
  position: relative;
}
.fleet-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 3px; height: 100%;
  background: var(--brand-forest);
}
.fleet-card__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: var(--sp-5);
  padding-bottom: var(--sp-4);
  border-bottom: 1px solid var(--hairline);
}
.fleet-card__title {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
}
.fleet-card__meta {
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-muted);
  font-weight: 500;
}

.fleet-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: var(--sp-7);
}

.fleet-list {
  display: flex;
  flex-direction: column;
  gap: 1px;
  background: var(--hairline);
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
}
.fleet-list__item {
  background: var(--bg-card);
  display: grid;
  grid-template-columns: 24px 1fr auto auto;
  align-items: center;
  gap: var(--sp-4);
  padding: var(--sp-3) var(--sp-3);
}
.fleet-list__dot {
  width: 10px; height: 10px;
  border-radius: 2px;
  background: var(--brand-moss);
  margin-left: 4px;
}
.fleet-list__dot--offshore {
  background: var(--brand-forest);
  width: 12px; height: 12px;
  border-radius: 50%;
}
.fleet-list__site {
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-primary);
}
.fleet-list__country {
  font-size: 11px;
  color: var(--ink-muted);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.fleet-list__mw {
  font-size: 13px;
  color: var(--ink-secondary);
  font-variant-numeric: tabular-nums;
  text-align: right;
  font-weight: 500;
}
.fleet-list__cod {
  font-size: 12px;
  color: var(--ink-muted);
  font-variant-numeric: tabular-nums;
  padding: 2px 8px;
  background: var(--bg-subtle);
  border-radius: 2px;
  font-weight: 500;
}

/* ============ FOOTER ============ */
.footer {
  border-top: 1px solid var(--hairline);
  padding: var(--sp-5) var(--sp-7);
  font-size: 12px;
  color: var(--ink-muted);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg-sage);
  margin-top: var(--sp-9);
}
.footer__mark { font-weight: 500; color: var(--ink-secondary); }

/* ============ UTILITIES ============ */
.row { display: flex; gap: var(--sp-4); align-items: center; }
.row--baseline { align-items: baseline; }
.row--between { justify-content: space-between; }
.col { display: flex; flex-direction: column; gap: var(--sp-3); }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-5); }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-5); }
.grid-2-1 { display: grid; grid-template-columns: 2fr 1fr; gap: var(--sp-5); }
.grid-1-2 { display: grid; grid-template-columns: 1fr 2fr; gap: var(--sp-5); }

.tag {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: 2px;
  background: var(--bg-subtle);
  color: var(--ink-secondary);
}
.tag--forest { background: var(--bg-sage-deep); color: var(--brand-forest); }
.tag--burgundy { background: rgba(124,45,18,0.08); color: var(--brand-burgundy); }
.tag--moss { background: rgba(82,121,111,0.12); color: var(--brand-moss); }

.divider { height: 1px; background: var(--hairline); margin: var(--sp-5) 0; }

/* ============ RESPONSIVE ============ */
@media (max-width: 900px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { position: relative; height: auto; }
  .content, .hero { padding-left: var(--sp-5); padding-right: var(--sp-5); }
  .glance-strip { grid-template-columns: repeat(2, 1fr); }
  .fleet-grid { grid-template-columns: 1fr; }
}
