/* =========================================================
   digiTIES Portal — styles.css
   Concept C: minimalist, sage-green wash, gold accents
   ========================================================= */

:root {
  /* Brand colors */
  --green-deepest: #1A4D3C;
  --green-mid: #2D6B4F;
  --green-light: #5A9678;
  --gold: #C9A961;
  --gold-soft: rgba(201, 169, 97, 0.75);

  /* Background gradient stops */
  --bg-top: #F0F4F1;
  --bg-bottom: #FFFFFF;

  /* Text */
  --text-primary: #1A4D3C;
  --text-secondary: #5A6B62;
  --text-tertiary: #8A9690;
  --text-on-dark: #FFFFFF;

  /* Surfaces & borders */
  --card-bg: #FFFFFF;
  --card-border: #D4DDD7;
  --divider: #E8EDE9;

  /* Type */
  --font-serif: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --font-sans: 'Inter Tight', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* Layout */
  --content-max: 1080px;
  --radius-sm: 4px;
  --radius-md: 8px;
}

/* -------- Reset & base -------- */

*, *::before, *::after { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-primary);
  background: linear-gradient(180deg, var(--bg-top) 0%, var(--bg-bottom) 65%);
  background-attachment: fixed;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: inherit; text-decoration: none; }

button {
  font-family: inherit;
  cursor: pointer;
}

ul { list-style: none; padding: 0; margin: 0; }

/* Skip link for keyboard users */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--green-deepest);
  color: var(--text-on-dark);
  padding: 8px 16px;
  z-index: 100;
}
.skip-link:focus { left: 8px; top: 8px; }

/* Focus ring */
:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: 4px;
}

/* -------- Layout: header -------- */

.site-header {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 28px 32px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-mark {
  width: 26px;
  height: 26px;
  border: 1.5px solid var(--green-deepest);
  border-radius: var(--radius-sm);
  transform: rotate(45deg);
  display: flex;
  align-items: center;
  justify-content: center;
}

.brand-mark-inner {
  width: 8px;
  height: 8px;
  background: var(--gold);
}

.brand-name {
  font-weight: 500;
  font-size: 15px;
  color: var(--green-deepest);
  letter-spacing: 0.01em;
}

.header-actions { display: flex; gap: 18px; }

.header-link {
  font-size: 13px;
  color: var(--text-secondary);
  transition: color 0.18s ease;
}
.header-link:hover { color: var(--green-deepest); }

/* -------- Layout: hero -------- */

.hero {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 56px 32px 48px;
  text-align: center;
}

.eyebrow {
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 14px;
  font-weight: 500;
}

.welcome {
  font-family: var(--font-serif);
  font-size: clamp(32px, 4.5vw, 44px);
  font-weight: 400;
  line-height: 1.15;
  color: var(--green-deepest);
  margin: 0 0 12px;
  letter-spacing: -0.01em;
}

/* Smooth swap when SSO personalization arrives */
.welcome-text {
  display: inline-block;
  transition: opacity 0.35s ease;
}
.welcome-text.fading { opacity: 0; }

.subhead {
  font-size: 15px;
  color: var(--text-secondary);
  margin: 0 0 40px;
}

/* -------- CTA grid -------- */

.cta-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin: 0 0 36px;
  padding: 12px 0;
}

.cta-tile {
  background: var(--green-deepest);
  border-radius: var(--radius-sm);
  padding: 28px 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 140px;
  color: var(--text-on-dark);
  transition: transform 0.28s cubic-bezier(0.2, 0.8, 0.2, 1),
              box-shadow 0.28s cubic-bezier(0.2, 0.8, 0.2, 1);
  position: relative;
}

.cta-tuition  { background: var(--green-deepest); }
.cta-learning { background: var(--green-mid); }
.cta-community { background: var(--green-light); }

.cta-tile:hover,
.cta-tile:focus-visible {
  transform: scale(1.06) translateY(-4px);
  box-shadow: 0 14px 32px rgba(26, 77, 60, 0.28),
              0 0 0 2px var(--gold);
  z-index: 5;
}

.cta-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  margin-bottom: 14px;
  color: var(--gold);
}
.cta-icon svg { width: 28px; height: 28px; }

.cta-title {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-on-dark);
  margin-bottom: 4px;
}

.cta-subtitle {
  font-size: 12px;
  color: var(--gold);
  font-weight: 400;
  letter-spacing: 0.01em;
}

/* -------- Info grid (announcements + calendar) -------- */

.info-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 16px;
  text-align: left;
  margin-bottom: 32px;
}

.info-card {
  background: var(--card-bg);
  border: 0.5px solid var(--card-border);
  border-radius: var(--radius-sm);
  padding: 18px 22px;
}

.info-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 0.5px solid var(--divider);
}

.info-eyebrow {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 500;
  margin: 0;
}

.info-link {
  font-size: 11px;
  color: var(--text-tertiary);
  transition: color 0.18s ease;
}
.info-link:hover { color: var(--green-deepest); }
.info-link::after {
  content: " →";
  letter-spacing: 0;
}

.info-list { display: flex; flex-direction: column; gap: 12px; }

.info-item {
  font-size: 13px;
}

.info-title {
  font-size: 13px;
  font-weight: 500;
  color: var(--green-deepest);
  margin: 0 0 2px;
  line-height: 1.4;
}

.info-meta {
  font-size: 11px;
  color: var(--text-tertiary);
  margin: 0;
  line-height: 1.4;
}

/* Event date chip */
.info-item.event {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.event-date {
  background: var(--bg-top);
  border-radius: var(--radius-sm);
  padding: 4px 8px;
  text-align: center;
  min-width: 38px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
}

.event-month {
  font-size: 9px;
  color: var(--gold);
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.event-day {
  font-size: 14px;
  color: var(--green-deepest);
  font-weight: 500;
  line-height: 1;
  margin-top: 2px;
}

.event-detail { flex: 1; }

.info-loading .info-meta {
  font-style: italic;
  opacity: 0.7;
}

/* -------- Footer -------- */

.site-footer {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 24px 32px 32px;
  text-align: center;
  font-size: 11px;
  color: var(--text-tertiary);
}

.site-footer p { margin: 0; }

/* -------- Responsive -------- */

@media (max-width: 720px) {
  .site-header { padding: 20px 20px 0; }
  .hero { padding: 40px 20px 32px; }

  .welcome { font-size: 30px; }
  .subhead { margin-bottom: 28px; }

  .cta-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .cta-tile {
    flex-direction: row;
    justify-content: flex-start;
    text-align: left;
    padding: 18px 22px;
    min-height: auto;
  }

  .cta-tile:hover,
  .cta-tile:focus-visible {
    transform: scale(1.02) translateY(-2px);
  }

  .cta-icon {
    margin-bottom: 0;
    margin-right: 16px;
    flex-shrink: 0;
  }

  .cta-title { display: block; margin-bottom: 2px; }
  .cta-subtitle { display: block; }

  .info-grid {
    grid-template-columns: 1fr;
  }
}

/* Reduce motion preference */
@media (prefers-reduced-motion: reduce) {
  .cta-tile,
  .welcome-text,
  .header-link,
  .info-link {
    transition: none;
  }
  .cta-tile:hover,
  .cta-tile:focus-visible {
    transform: none;
  }
}
