/* ============================================================
   MELO TONE LIMITED — Global Styles
   ============================================================ */

@import url("https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;0,600;0,700;1,300;1,400;1,600&family=Inter:wght@300;400;500;600;700&display=swap");
@import "./tokens.css";
@import "./utilities.css";

/* ---- Reset / Base ---- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: 1.75;
  color: var(--melo-navy);
  background-color: var(--melo-soft-white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* ---- Skip Link ---- */
.skip-link {
  position: absolute;
  top: -100%;
  left: var(--space-4);
  z-index: 9999;
  padding: var(--space-3) var(--space-6);
  background: var(--melo-lilac);
  color: var(--melo-midnight);
  font-weight: 700;
  border-radius: var(--radius-sm);
  text-decoration: none;
  font-size: var(--text-sm);
  transition: top var(--duration-fast) var(--ease-smooth);
}
.skip-link:focus {
  top: var(--space-4);
}

/* ---- Typography ---- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-serif);
  line-height: 0.92;
  letter-spacing: -0.04em;
  font-weight: 600;
  color: var(--melo-navy);
}

h1 {
  font-size: clamp(3.5rem, 8vw, 9rem);
  line-height: 0.88;
  letter-spacing: -0.055em;
}
h2 {
  font-size: clamp(2.4rem, 5vw, 5.8rem);
  line-height: 0.92;
  letter-spacing: -0.042em;
}
h3 {
  font-size: clamp(1.8rem, 3vw, 3.2rem);
  line-height: 1.0;
  letter-spacing: -0.03em;
}
h4 {
  font-size: clamp(1.35rem, 2vw, 1.9rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
}
h5 {
  font-size: clamp(1.1rem, 1.5vw, 1.3rem);
  line-height: 1.25;
  letter-spacing: -0.01em;
  font-family: var(--font-sans);
  font-weight: 600;
}
h6 {
  font-size: var(--text-base);
  line-height: 1.4;
  font-family: var(--font-sans);
  font-weight: 600;
}

p {
  font-family: var(--font-sans);
  font-size: clamp(1rem, 1.2vw, 1.075rem);
  line-height: 1.78;
  color: inherit;
}

a {
  color: var(--melo-violet);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color var(--duration-fast) var(--ease-smooth);
}
a:hover { color: var(--melo-lilac); }
a:focus-visible {
  outline: 2px solid var(--melo-lilac);
  outline-offset: 3px;
  border-radius: 2px;
}

ul, ol { padding-left: var(--space-6); }
li { margin-bottom: var(--space-2); }

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ---- Eyebrow / Label ---- */
.eyebrow {
  display: inline-block;
  font-family: var(--font-label);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--melo-violet);
}

.eyebrow--light {
  color: var(--melo-pale-lilac);
}

/* ---- Waveform decorative SVG line ---- */
.waveform-line {
  width: 100%;
  overflow: visible;
  pointer-events: none;
  user-select: none;
}

/* ---- Section Wrapper ---- */
.section {
  padding: var(--section-pad-y) var(--section-pad-x);
  position: relative;
  overflow: hidden;
}

.section--dark,
.section--navy {
  color: var(--melo-soft-white);
}

.section--dark h1,
.section--dark h2,
.section--dark h3,
.section--dark h4,
.section--dark h5,
.section--dark h6,
.section--navy h1,
.section--navy h2,
.section--navy h3,
.section--navy h4,
.section--navy h5,
.section--navy h6 {
  color: var(--melo-soft-white);
}

.section--ivory {
  background: var(--melo-ivory);
}

.section--champagne {
  background: var(--melo-champagne);
}

.section--dark {
  background: var(--melo-midnight);
}

.section--navy {
  background: var(--melo-navy);
}

/* ---- Container ---- */
.container {
  width: 100%;
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 0 var(--section-pad-x);
}

.container--wide {
  max-width: var(--max-width);
}

.container--narrow {
  max-width: var(--narrow-width);
}

/* ---- Lilac accent top line ---- */
.accent-line {
  display: block;
  width: 48px;
  height: 2px;
  background: linear-gradient(90deg, var(--melo-lilac), var(--melo-violet));
  border-radius: var(--radius-full);
  margin-bottom: var(--space-6);
}

.accent-line--centre {
  margin-left: auto;
  margin-right: auto;
}

/* ---- Waveform SVG Divider ---- */
.wave-divider {
  display: block;
  width: 100%;
  overflow: hidden;
  line-height: 0;
}

.wave-divider svg {
  display: block;
  width: 100%;
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: 0.02em;
  text-decoration: none;
  padding: 0.875rem 2rem;
  border-radius: var(--radius-full);
  border: 2px solid transparent;
  cursor: pointer;
  transition:
    background var(--duration-normal) var(--ease-smooth),
    color var(--duration-normal) var(--ease-smooth),
    border-color var(--duration-normal) var(--ease-smooth),
    box-shadow var(--duration-normal) var(--ease-smooth),
    transform var(--duration-fast) var(--ease-smooth);
  white-space: nowrap;
}

.btn:focus-visible {
  outline: 2px solid var(--melo-lilac);
  outline-offset: 4px;
}

.btn:active {
  transform: translateY(1px);
}

.btn--primary {
  background: var(--melo-navy);
  color: var(--melo-soft-white);
  border-color: var(--melo-navy);
}

.btn--primary:hover {
  background: var(--melo-deep-blue);
  border-color: var(--melo-lilac);
  box-shadow: 0 0 24px var(--melo-glow);
  color: var(--melo-soft-white);
}

.btn--accent {
  background: var(--melo-violet);
  color: var(--melo-soft-white);
  border-color: var(--melo-violet);
}

.btn--accent:hover {
  background: var(--melo-lilac);
  border-color: var(--melo-lilac);
  box-shadow: 0 0 28px var(--melo-glow-strong);
  color: var(--melo-midnight);
}

.btn--outline {
  background: transparent;
  color: var(--melo-navy);
  border-color: var(--melo-navy);
}

.btn--outline:hover {
  background: var(--melo-navy);
  color: var(--melo-soft-white);
}

.btn--outline-light {
  background: transparent;
  color: var(--melo-soft-white);
  border-color: rgba(255, 255, 255, 0.4);
}

.btn--outline-light:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--melo-pale-lilac);
  color: var(--melo-pale-lilac);
}

.btn--ghost {
  background: transparent;
  color: var(--melo-violet);
  border-color: transparent;
  padding-left: 0;
  padding-right: 0;
}

.btn--ghost::after {
  content: "→";
  transition: transform var(--duration-normal) var(--ease-smooth);
  display: inline-block;
  margin-left: var(--space-2);
}

.btn--ghost:hover {
  color: var(--melo-lilac);
}

.btn--ghost:hover::after {
  transform: translateX(4px);
}

.btn--lg {
  padding: 1.1rem 2.5rem;
  font-size: var(--text-base);
}

/* ---- Form Elements ---- */
.form-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.form-label {
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--melo-navy);
  letter-spacing: 0.01em;
}

.form-label--required::after {
  content: " *";
  color: var(--melo-violet);
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 0.875rem 1.125rem;
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: 1.5;
  color: var(--melo-navy);
  background: var(--melo-soft-white);
  border: 1.5px solid var(--melo-line);
  border-radius: var(--radius-md);
  transition:
    border-color var(--duration-fast) var(--ease-smooth),
    box-shadow var(--duration-fast) var(--ease-smooth);
  appearance: none;
  -webkit-appearance: none;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--melo-violet);
  box-shadow: 0 0 0 3px var(--melo-glow);
}

.form-textarea {
  resize: vertical;
  min-height: 140px;
}

.form-helper {
  font-size: var(--text-xs);
  color: var(--melo-muted);
  line-height: 1.5;
}

.form-checkbox-group {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
}

.form-checkbox {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  flex-shrink: 0;
  accent-color: var(--melo-violet);
  cursor: pointer;
}

.form-checkbox-label {
  font-size: var(--text-sm);
  line-height: 1.6;
  color: var(--melo-navy);
}

/* ---- Cards ---- */
.card {
  background: var(--melo-soft-white);
  border: 1px solid var(--melo-line);
  border-radius: var(--radius-lg);
  padding: var(--space-8);
  position: relative;
  overflow: hidden;
  transition:
    box-shadow var(--duration-normal) var(--ease-smooth),
    transform var(--duration-normal) var(--ease-smooth);
}

.card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-3px);
}

.card--glass {
  background: rgba(255, 253, 248, 0.06);
  border-color: var(--melo-dark-line);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.card--ivory {
  background: var(--melo-ivory);
  border-color: var(--melo-line);
}

.card--dark {
  background: var(--melo-deep-blue);
  border-color: var(--melo-dark-line);
  color: var(--melo-soft-white);
}

.card--dark h3,
.card--dark h4,
.card--dark h5 {
  color: var(--melo-soft-white);
}

.card__waveform-line {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--melo-lilac), var(--melo-violet), transparent);
  border-radius: var(--radius-full) var(--radius-full) 0 0;
}

/* ---- Grid Helpers ---- */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-8);
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-8);
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-6);
}

@media (max-width: 1023px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 767px) {
  .grid-4,
  .grid-3,
  .grid-2 { grid-template-columns: 1fr; }
}

/* ---- Hero image container ---- */
.hero-image {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.hero-image::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(8, 11, 34, 0.88) 0%,
    rgba(8, 11, 34, 0.68) 50%,
    rgba(18, 23, 58, 0.55) 100%
  );
}

/* ---- Audio Ring decorative ---- */
.audio-ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid var(--melo-dark-line);
  pointer-events: none;
  user-select: none;
}

.audio-ring--glow {
  border-color: var(--melo-glow);
  box-shadow: 0 0 40px var(--melo-glow);
}

/* ---- Gradient backgrounds ---- */
.bg-gradient-dark {
  background: linear-gradient(
    135deg,
    var(--melo-midnight) 0%,
    var(--melo-navy) 50%,
    var(--melo-deep-blue) 100%
  );
}

.bg-gradient-light {
  background: linear-gradient(
    135deg,
    var(--melo-soft-white) 0%,
    var(--melo-ivory) 60%,
    var(--melo-champagne) 100%
  );
}

/* ---- Reveal animations ---- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity var(--duration-slow) var(--ease-smooth),
    transform var(--duration-slow) var(--ease-smooth);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal--delay-1 { transition-delay: 100ms; }
.reveal--delay-2 { transition-delay: 200ms; }
.reveal--delay-3 { transition-delay: 300ms; }
.reveal--delay-4 { transition-delay: 400ms; }
.reveal--delay-5 { transition-delay: 500ms; }

/* ---- Section heading group ---- */
.section-heading {
  margin-bottom: var(--space-12);
}

.section-heading--centre {
  text-align: center;
}

.section-heading p {
  max-width: 60ch;
  margin-top: var(--space-5);
  color: var(--melo-muted);
}

.section-heading--centre p {
  margin-left: auto;
  margin-right: auto;
}

/* ---- Process Flow ---- */
.process-flow {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-8);
  position: relative;
}

.process-step {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-4);
}

.process-step__number {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 2px solid var(--melo-lilac);
  color: var(--melo-lilac);
  font-family: var(--font-serif);
  font-size: var(--text-xl);
  font-weight: 600;
  flex-shrink: 0;
}

/* ---- Tags / Badges ---- */
.tag {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.875rem;
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.04em;
  border: 1px solid var(--melo-dark-line);
  color: var(--melo-pale-lilac);
  background: rgba(168, 140, 255, 0.1);
  white-space: nowrap;
}

.tag--light {
  border-color: var(--melo-line);
  color: var(--melo-violet);
  background: rgba(117, 104, 216, 0.08);
}

/* ---- Notice / Info box ---- */
.notice {
  padding: var(--space-6);
  background: rgba(168, 140, 255, 0.08);
  border-left: 3px solid var(--melo-lilac);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  font-size: var(--text-sm);
  line-height: 1.7;
  color: var(--melo-navy);
}

.notice--dark {
  background: rgba(168, 140, 255, 0.12);
  color: var(--melo-soft-white);
  border-color: var(--melo-lilac);
}

/* ---- Platform strip ---- */
.platform-strip {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  align-items: center;
}

/* ---- Checklist ---- */
.checklist {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.checklist li {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  font-size: var(--text-base);
  margin-bottom: 0;
}

.checklist li::before {
  content: "";
  display: inline-block;
  width: 18px;
  height: 18px;
  min-width: 18px;
  margin-top: 3px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none'%3E%3Ccircle cx='10' cy='10' r='9' stroke='%237568d8' stroke-width='1.5'/%3E%3Cpath d='M6.5 10.5l2.5 2.5 4.5-5' stroke='%237568d8' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
}

/* ---- Pathway trio ---- */
.pathway-trio {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border: 1px solid var(--melo-dark-line);
  border-radius: var(--radius-xl);
  overflow: hidden;
}

.pathway-item {
  padding: var(--space-10) var(--space-8);
  border-right: 1px solid var(--melo-dark-line);
  position: relative;
}

.pathway-item:last-child {
  border-right: none;
}

@media (max-width: 767px) {
  .pathway-trio {
    grid-template-columns: 1fr;
  }
  .pathway-item {
    border-right: none;
    border-bottom: 1px solid var(--melo-dark-line);
  }
  .pathway-item:last-child {
    border-bottom: none;
  }
}

/* ---- Audience cards ---- */
.audience-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-6);
}

@media (max-width: 767px) {
  .audience-cards {
    grid-template-columns: 1fr;
  }
}

/* ---- Page hero ---- */
.page-hero {
  padding: calc(var(--header-height) + var(--space-16)) var(--section-pad-x) var(--space-16);
  position: relative;
  overflow: hidden;
  min-height: 480px;
  display: flex;
  align-items: flex-end;
}

.page-hero--tall {
  min-height: 600px;
}

.page-hero--home {
  min-height: 92vh;
  align-items: center;
}

/* ---- Floating service tags ---- */
.service-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: var(--space-8);
}

/* ---- Responsive images ---- */
.responsive-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ---- Two-col layout ---- */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-16);
  align-items: center;
}

.two-col--reverse .two-col__content {
  order: 2;
}
.two-col--reverse .two-col__media {
  order: 1;
}

@media (max-width: 1023px) {
  .two-col {
    grid-template-columns: 1fr;
    gap: var(--space-10);
  }
  .two-col--reverse .two-col__content { order: 1; }
  .two-col--reverse .two-col__media  { order: 2; }
}

/* ---- Legal page ---- */
.legal-content {
  max-width: var(--narrow-width);
  margin: 0 auto;
}

.legal-content h2 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  margin-top: var(--space-12);
  margin-bottom: var(--space-4);
}

.legal-content h3 {
  font-size: clamp(1.2rem, 2vw, 1.5rem);
  margin-top: var(--space-8);
  margin-bottom: var(--space-3);
}

.legal-content p {
  margin-bottom: var(--space-5);
}

.legal-content ul {
  margin-bottom: var(--space-5);
}

.legal-content li {
  margin-bottom: var(--space-2);
}

/* ---- Smooth image reveal ---- */
.img-reveal {
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.img-reveal img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--duration-slow) var(--ease-smooth);
}

.img-reveal:hover img {
  transform: scale(1.03);
}
