/* =============================================================
   ABCJS – Japan Seattle ABC Network
   Common Stylesheet  v0.1.0
   Theme: Cherry Blossom  |  Primary: #dda2d9
   ============================================================= */

/* --- Google Fonts import ----------------------------------- */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,600;0,700;1,400&family=Inter:wght@300;400;500;600&display=swap');

/* --- CSS Custom Properties --------------------------------- */
:root {
  /* Brand colours */
  --color-primary:        #dda2d9;   /* cherry blossom mauve */
  --color-primary-light:  #f4d6f0;   /* petal tint */
  --color-primary-dark:   #b57ab1;   /* deeper mauve */
  --color-accent:         #7a3066;   /* deep rose / plum */
  --color-accent-hover:   #5c2250;
  --color-navy:           #1a1a3e;   /* contrast dark */
  --color-navy-mid:       #2e2e5e;
  --color-bg:             #fdfaf9;   /* warm off-white */
  --color-bg-alt:         #f9f0f8;   /* faint petal tint background */
  --color-text:           #2d2d2d;
  --color-text-muted:     #6b6b7a;
  --color-border:         #e8d5e5;
  --color-white:          #ffffff;

  /* Typography */
  --font-heading: 'Playfair Display', Georgia, serif;
  --font-body:    'Inter', system-ui, sans-serif;

  /* Spacing scale */
  --space-xs:  0.5rem;
  --space-sm:  1rem;
  --space-md:  2rem;
  --space-lg:  4rem;
  --space-xl:  6rem;

  /* Border radius */
  --radius-sm:  0.5rem;
  --radius-md:  1rem;
  --radius-lg:  1.5rem;
  --radius-pill: 999px;

  /* Shadows */
  --shadow-card: 0 4px 24px rgba(221,162,217,0.13);
  --shadow-card-hover: 0 8px 36px rgba(122,48,102,0.18);
  --shadow-nav:  0 2px 16px rgba(26,26,62,0.08);

  /* Transitions */
  --transition: 0.24s ease;

  /* Layout */
  --max-width: 1180px;
  --nav-height: 70px;
}

/* --- Reset / base ------------------------------------------ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--color-accent);
  text-decoration: none;
  transition: color var(--transition);
}

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

ul, ol {
  list-style: none;
}

/* --- Typography -------------------------------------------- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--color-navy);
  line-height: 1.25;
}

h1 { font-size: clamp(2.4rem, 5vw, 3.8rem); }
h2 { font-size: clamp(1.8rem, 3.5vw, 2.6rem); }
h3 { font-size: clamp(1.25rem, 2.5vw, 1.6rem); }
h4 { font-size: 1.15rem; font-family: var(--font-body); font-weight: 600; }

p { color: var(--color-text); }

.text-muted { color: var(--color-text-muted); }
.text-center { text-align: center; }
.text-accent { color: var(--color-accent); }

/* --- Layout helpers ---------------------------------------- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-md);
}

.section {
  padding: var(--space-lg) 0;
}

.section--alt {
  background: var(--color-bg-alt);
}

.section-label {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: var(--space-xs);
}

.section-title {
  margin-bottom: var(--space-sm);
}

.section-subtitle {
  font-size: 1.05rem;
  color: var(--color-text-muted);
  max-width: 620px;
  margin-bottom: var(--space-md);
}

.section-header {
  margin-bottom: var(--space-md);
}

.section-header.centered {
  text-align: center;
}

.section-header.centered .section-subtitle {
  margin-left: auto;
  margin-right: auto;
}

/* --- Grid layouts ------------------------------------------ */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-md);
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-md);
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-md);
}

/* --- Buttons ----------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.75rem;
  border-radius: var(--radius-pill);
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all var(--transition);
  text-decoration: none;
}

.btn-primary {
  background: var(--color-accent);
  color: var(--color-white);
  border-color: var(--color-accent);
}

.btn-primary:hover {
  background: var(--color-accent-hover);
  border-color: var(--color-accent-hover);
  color: var(--color-white);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(122,48,102,0.3);
}

.btn-outline {
  background: transparent;
  color: var(--color-accent);
  border-color: var(--color-accent);
}

.btn-outline:hover {
  background: var(--color-accent);
  color: var(--color-white);
  transform: translateY(-2px);
}

.btn-white {
  background: var(--color-white);
  color: var(--color-accent);
  border-color: var(--color-white);
}

.btn-white:hover {
  background: var(--color-primary-light);
  color: var(--color-accent-hover);
  transform: translateY(-2px);
}

.btn-outline-white {
  background: transparent;
  color: var(--color-white);
  border-color: rgba(255,255,255,0.7);
}

.btn-outline-white:hover {
  background: rgba(255,255,255,0.15);
  border-color: var(--color-white);
  color: var(--color-white);
}

/* --- Cards ------------------------------------------------- */
.card {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: transform var(--transition), box-shadow var(--transition);
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-card-hover);
}

.card-body {
  padding: var(--space-md);
}

.card-image {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  background: linear-gradient(135deg, var(--color-primary-light), var(--color-primary));
  display: flex;
  align-items: center;
  justify-content: center;
}

/* --- Badges / tags ----------------------------------------- */
.badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-pill);
  background: var(--color-primary-light);
  color: var(--color-accent);
}

.badge--academic  { background: #d4ebf8; color: #1a5f8a; }
.badge--business  { background: #d8f4e4; color: #1a6640; }
.badge--culture   { background: #f4d6f0; color: #7a3066; }
.badge--news      { background: #fff3cd; color: #856404; }

/* --- Divider / petal decoration ---------------------------- */
.petal-divider {
  text-align: center;
  color: var(--color-primary);
  font-size: 1.5rem;
  letter-spacing: 0.5rem;
  margin: var(--space-md) 0;
  opacity: 0.5;
  user-select: none;
}

/* --- Navigation -------------------------------------------- */
.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 3px solid var(--color-primary);
  border-bottom: 1px solid rgba(181,122,177,0.3);
  z-index: 1000;
  box-shadow: var(--shadow-nav);
  transition: background var(--transition), box-shadow var(--transition);
}

.nav-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  flex-shrink: 0;
}

.nav-logo-mark {
  width: 40px;
  height: 40px;
}

.nav-logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.nav-logo-name {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.82rem;
  color: var(--color-navy);
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.nav-logo-tagline {
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-accent);
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.nav-link {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-navy-mid);
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
  white-space: nowrap;
}

.nav-link:hover,
.nav-link.active {
  color: var(--color-accent);
  background: var(--color-primary-light);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

.nav-actions .btn {
  padding: 0.55rem 1.25rem;
  font-size: 0.85rem;
}

/* Dropdown */
.nav-item {
  position: relative;
}

.nav-dropdown-toggle {
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.nav-dropdown-toggle::after {
  content: '▾';
  font-size: 0.7rem;
  transition: transform var(--transition);
}

.nav-item:hover .nav-dropdown-toggle::after {
  transform: rotate(180deg);
}

.nav-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 200px;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: 0 12px 32px rgba(26,26,62,0.12);
  padding: 0.5rem;
  padding-top: calc(0.5rem + 0.5rem); /* top half is invisible bridge over the gap */
  margin-top: -0.5rem;               /* pull up so visual gap is 0.5rem from link */
  opacity: 0;
  pointer-events: none;
  transform: translateY(-8px);
  transition: all var(--transition);
  z-index: 100;
}

.nav-item:hover .nav-dropdown {
  opacity: 1;
  pointer-events: all;
  transform: translateY(0);
}

.nav-dropdown a {
  display: block;
  padding: 0.6rem 0.9rem;
  font-size: 0.875rem;
  color: var(--color-navy-mid);
  border-radius: var(--radius-sm);
  transition: all var(--transition);
}

.nav-dropdown a:hover {
  background: var(--color-bg-alt);
  color: var(--color-accent);
}

.nav-dropdown-divider {
  height: 1px;
  background: var(--color-border);
  margin: 0.35rem 0.5rem;
}

.nav-dropdown-section-label {
  display: block;
  padding: 0.35rem 0.9rem 0.15rem;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

/* Mobile hamburger */
.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 0.5rem;
  background: none;
  border: none;
}

.nav-hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-navy);
  border-radius: 2px;
  transition: all var(--transition);
}

/* --- Footer ------------------------------------------------ */
.site-footer {
  background: #1c0829;
  color: rgba(255,255,255,0.8);
  padding: var(--space-lg) 0 var(--space-md);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--space-lg);
  margin-bottom: var(--space-lg);
}

.footer-brand {}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: var(--space-sm);
}

.footer-logo-name {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--color-white);
}

.footer-tagline {
  color: var(--color-primary-light);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: var(--space-sm);
}

.footer-desc {
  font-size: 0.875rem;
  line-height: 1.7;
  color: rgba(255,255,255,0.65);
  max-width: 300px;
  margin-bottom: var(--space-sm);
}

.footer-social {
  display: flex;
  gap: 0.75rem;
}

.footer-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  color: var(--color-white);
  font-size: 0.9rem;
  transition: all var(--transition);
  text-decoration: none;
}

.footer-social a:hover {
  background: var(--color-primary);
  color: var(--color-navy);
  transform: translateY(-3px);
}

.footer-col-title {
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-primary-light);
  margin-bottom: 1rem;
}

.footer-col ul li {
  margin-bottom: 0.5rem;
}

.footer-col ul li a {
  font-size: 0.875rem;
  color: rgba(255,255,255,0.65);
  transition: color var(--transition);
}

.footer-col ul li a:hover {
  color: var(--color-primary);
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: var(--space-md);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.45);
  flex-wrap: wrap;
}

.footer-bottom a {
  color: rgba(255,255,255,0.55);
}

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

/* --- Utility ----------------------------------------------- */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mb-sm { margin-bottom: var(--space-sm); }
.mb-md { margin-bottom: var(--space-md); }

/* --- Responsive -------------------------------------------- */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: var(--space-md); }
}

@media (max-width: 768px) {
  :root { --space-lg: 3rem; }

  .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: 1fr 1fr; }

  .nav-menu,
  .nav-actions .btn-outline { display: none; }

  .nav-hamburger { display: flex; }

  /* Mobile nav open state – toggled via JS */
  .site-nav.nav-open .nav-menu {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    position: absolute;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: var(--color-white);
    padding: var(--space-sm) var(--space-md);
    border-bottom: 1px solid var(--color-border);
    box-shadow: var(--shadow-card);
    gap: 0.1rem;
  }

  .site-nav.nav-open .nav-dropdown {
    position: static;
    opacity: 1;
    pointer-events: all;
    transform: none;
    box-shadow: none;
    border: none;
    background: var(--color-bg-alt);
    margin-left: 0.5rem;
    margin-top: 0.25rem;
    padding: 0.25rem 0;
  }

  .footer-grid { grid-template-columns: 1fr; gap: var(--space-md); }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 480px) {
  .grid-4 { grid-template-columns: 1fr; }
  .btn { width: 100%; justify-content: center; }
}
