/* Light theme for the landing page and the SEO pages (activated by
   <html data-theme="light">, same switch and saved choice as the app).
   The sample cover mock-ups on the landing page (.preview-paper, .fake-paper*)
   are deliberately left as they are. */

html[data-theme="light"] {
  color-scheme: light;
  --ink: #EEF1F6;
  --panel: #FFFFFF;
  --panel-2: #F6F7FA;
  --panel-3: #EDEFF4;
  --line: rgba(20, 28, 48, .10);
  --line-2: rgba(20, 28, 48, .18);
  --text: #141A28;
  --dim: #4A5266;
  --faint: #7A8296;
  --brass: #B97F14;
  --brass-2: #9A6A0E;
  --brass-ink: #FFF8EA;
  --teal: #1F8F82;
}

html[data-theme="light"] body {
  background:
    radial-gradient(900px 650px at 9% 0%, rgba(214, 162, 74, .14), transparent 65%),
    radial-gradient(850px 620px at 92% 13%, rgba(95, 192, 180, .11), transparent 63%),
    var(--ink);
}

html[data-theme="light"] .noise {
  opacity: .02;
  mix-blend-mode: multiply;
}

html[data-theme="light"] .ambient-a {
  background: rgba(214, 162, 74, .2);
}

html[data-theme="light"] .ambient-b {
  background: rgba(95, 192, 180, .15);
}

/* header */
html[data-theme="light"] .brand-mark {
  box-shadow: 0 4px 14px -4px rgba(185, 127, 20, .45), inset 0 1px 0 rgba(255, 255, 255, .5);
}

html[data-theme="light"] .nav-cta {
  background: rgba(20, 28, 48, .03);
}

html[data-theme="light"] .nav-cta:hover {
  border-color: rgba(185, 127, 20, .5);
}

/* buttons */
html[data-theme="light"] .primary-btn,
html[data-theme="light"] .continue-btn,
html[data-theme="light"] .secondary-btn {
  box-shadow: 0 14px 30px -18px rgba(185, 127, 20, .6);
}

html[data-theme="light"] .primary-btn:hover,
html[data-theme="light"] .continue-btn:hover,
html[data-theme="light"] .secondary-btn:hover {
  box-shadow: 0 18px 38px -18px rgba(185, 127, 20, .7);
}

html[data-theme="light"] .secondary-btn:hover,
html[data-theme="light"] .seo-main .secondary-btn:hover {
  border-color: rgba(185, 127, 20, .5);
}

/* hero decoration */
html[data-theme="light"] .orbit {
  border-color: rgba(20, 28, 48, .09);
}

html[data-theme="light"] .paper-shadow {
  background: rgba(214, 162, 74, .2);
}

html[data-theme="light"] .floating-tag {
  background: rgba(255, 255, 255, .8);
  box-shadow: 0 15px 30px -22px rgba(20, 28, 48, .45);
}

html[data-theme="light"] .mini-card {
  background: rgba(255, 255, 255, .85);
  box-shadow: 0 18px 40px -26px rgba(20, 28, 48, .4);
}

html[data-theme="light"] .mini-icon {
  background: rgba(31, 143, 130, .12);
}

html[data-theme="light"] .eyebrow-dot {
  box-shadow: 0 0 0 5px rgba(31, 143, 130, .14);
}

/* get-started panels */
html[data-theme="light"] .starter-panel,
html[data-theme="light"] .university-panel {
  background: linear-gradient(180deg, rgba(20, 28, 48, .015), rgba(20, 28, 48, 0)), var(--panel);
}

html[data-theme="light"] .directory-pill {
  border-color: rgba(31, 143, 130, .28);
  background: rgba(31, 143, 130, .08);
}

html[data-theme="light"] .type-option.active {
  border-color: rgba(185, 127, 20, .55);
  background: rgba(185, 127, 20, .08);
  box-shadow: 0 12px 30px -25px rgba(185, 127, 20, .6);
}

html[data-theme="light"] .type-option.active>.option-icon {
  border-color: rgba(185, 127, 20, .3);
  background: rgba(185, 127, 20, .1);
}

html[data-theme="light"] .input-wrap:focus-within {
  border-color: rgba(185, 127, 20, .6);
  box-shadow: 0 0 0 3px rgba(185, 127, 20, .14);
}

html[data-theme="light"] .uni-search:focus-within {
  border-color: rgba(31, 143, 130, .55);
  box-shadow: 0 0 0 3px rgba(31, 143, 130, .12);
}

html[data-theme="light"] .uni-result:hover,
html[data-theme="light"] .uni-result:hover>.uni-avatar,
html[data-theme="light"] .uchip:hover {
  background: rgba(20, 28, 48, .035);
}

html[data-theme="light"] .uni-result.active,
html[data-theme="light"] .uni-result.active>.uni-avatar {
  background: rgba(31, 143, 130, .08);
  border-color: rgba(31, 143, 130, .3);
}

html[data-theme="light"] .continue-row {
  background: rgba(20, 28, 48, .025);
}

html[data-theme="light"] .summary-orb {
  background: rgba(185, 127, 20, .14);
}

/* flow cards / features */
html[data-theme="light"] .flow-card {
  background: radial-gradient(130% 110% at 100% 0%, rgba(214, 162, 74, .12), transparent 55%), linear-gradient(175deg, var(--panel), var(--panel-2) 85%);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .8) inset, 0 24px 48px -36px rgba(20, 28, 48, .35);
}

html[data-theme="light"] .flow-card:hover {
  box-shadow: 0 1px 0 rgba(255, 255, 255, .8) inset, 0 30px 60px -28px rgba(185, 127, 20, .25), 0 24px 50px -32px rgba(20, 28, 48, .3);
}

html[data-theme="light"] .flow-number {
  -webkit-text-stroke: 1px rgba(20, 28, 48, .12);
}

html[data-theme="light"] .flow-card:hover .flow-number {
  -webkit-text-stroke-color: rgba(185, 127, 20, .45);
}

html[data-theme="light"] .flow-icon {
  box-shadow: 0 10px 20px -14px rgba(20, 28, 48, .35), inset 0 1px 0 rgba(255, 255, 255, .6);
}

html[data-theme="light"] .flow-arrow {
  background: rgba(20, 28, 48, .03);
}

html[data-theme="light"] .flow-card:hover .flow-arrow {
  background: rgba(185, 127, 20, .12);
  border-color: rgba(185, 127, 20, .5);
}

html[data-theme="light"] .feature-list>div>i {
  background: rgba(185, 127, 20, .12);
}

html[data-theme="light"] .final-spark {
  background: rgba(185, 127, 20, .1);
  border-color: rgba(185, 127, 20, .25);
}

/* editor mock-up window (the UI frame only; the paper inside stays as is) */
html[data-theme="light"] .editor-window {
  box-shadow: 30px 35px 70px -45px rgba(20, 28, 48, .45);
}

html[data-theme="light"] .fake-sidebar {
  background: #F3F5F9;
}

html[data-theme="light"] .fake-card {
  background: rgba(20, 28, 48, .03);
}

html[data-theme="light"] .fake-line.wide {
  background: rgba(185, 127, 20, .25);
}

html[data-theme="light"] .fake-canvas {
  background: radial-gradient(500px 300px at 50% 40%, rgba(214, 162, 74, .1), transparent 70%);
}

html[data-theme="light"] .editor-glow {
  background: rgba(214, 162, 74, .16);
}

/* FAQ (landing + SEO pages) */
html[data-theme="light"] .home-faq details,
html[data-theme="light"] .seo-faq details {
  background: linear-gradient(180deg, rgba(20, 28, 48, .02), rgba(20, 28, 48, 0)), var(--panel);
}

html[data-theme="light"] .home-faq details:hover,
html[data-theme="light"] .seo-faq details:hover {
  border-color: rgba(185, 127, 20, .4);
}

html[data-theme="light"] .home-faq details[open],
html[data-theme="light"] .seo-faq details[open] {
  border-color: rgba(185, 127, 20, .5);
  box-shadow: 0 10px 30px rgba(20, 28, 48, .1);
}

/* SEO pages: university logos sit on their own light tile, so just soften the frame */
html[data-theme="light"] .logo-tile {
  border-color: var(--line-2);
  box-shadow: 0 14px 30px -22px rgba(20, 28, 48, .35);
}

/* theme toggle (header) */
.theme-toggle {
  --tw: 68px;
  --th: 36px;
  --tp: 3px;
  --tk: 30px;
  appearance: none;
  position: relative;
  flex: none;
  width: var(--tw);
  height: var(--th);
  margin-left: 0px;
  padding: 0;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  background: linear-gradient(180deg, rgba(255, 255, 255, .04), rgba(255, 255, 255, 0)), var(--panel-2);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, .35);
  cursor: pointer;
  overflow: hidden;
  transition: border-color .25s var(--ease), background .25s var(--ease), box-shadow .25s var(--ease);
}

/* sliding knob: right = dark, left = light */
.theme-toggle::before {
  content: "";
  position: absolute;
  top: calc(var(--tp) - 1px);
  left: calc(var(--tp) - 1px);
  width: var(--tk);
  height: var(--tk);
  border-radius: 50%;
  background: linear-gradient(140deg, var(--brass-2), var(--brass) 65%);
  box-shadow: 0 3px 10px -2px rgba(214, 162, 74, .6), inset 0 1px 0 rgba(255, 255, 255, .4);
  transform: translateX(calc(var(--tw) - var(--tk) - 2 * var(--tp)));
  transition: transform .4s cubic-bezier(.34, 1.4, .5, 1), box-shadow .3s var(--ease);
}

.theme-toggle i {
  position: absolute;
  top: 50%;
  width: var(--tk);
  height: var(--tk);
  margin-top: calc(var(--tk) / -2);
  display: flex !important;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  line-height: 1;
  pointer-events: none;
  transition: color .3s var(--ease), transform .4s cubic-bezier(.34, 1.4, .5, 1);
}

.theme-toggle .i-sun {
  left: calc(var(--tp) - 1px);
  color: var(--text-faint, var(--faint));
}

.theme-toggle .i-moon {
  right: calc(var(--tp) - 1px);
  color: var(--brass-ink);
  transform: rotate(0);
}

.theme-toggle:hover {
  border-color: var(--brass);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, .3), 0 0 0 3px rgba(214, 162, 74, .14);
}

.theme-toggle:active::before {
  width: calc(var(--tk) + 4px);
}

.theme-toggle:focus-visible {
  outline: 2px solid var(--brass-2);
  outline-offset: 3px;
}

html[data-theme="light"] .theme-toggle {
  background: linear-gradient(180deg, #fff, #EDEFF4);
  box-shadow: inset 0 1px 2px rgba(20, 28, 48, .1);
}

html[data-theme="light"] .theme-toggle::before {
  transform: translateX(0);
  box-shadow: 0 3px 10px -2px rgba(185, 127, 20, .55), inset 0 1px 0 rgba(255, 255, 255, .5);
}

html[data-theme="light"] .theme-toggle .i-sun {
  color: var(--brass-ink);
  transform: rotate(90deg);
}

html[data-theme="light"] .theme-toggle .i-moon {
  color: var(--text-faint, var(--faint));
}

html[data-theme="light"] .theme-toggle:hover {
  box-shadow: inset 0 1px 2px rgba(20, 28, 48, .1), 0 0 0 3px rgba(185, 127, 20, .16);
}

@media (prefers-reduced-motion: reduce) {

  .theme-toggle::before,
  .theme-toggle i {
    transition: none;
  }
}

/* header: keep "Open Maker" and the switch together on the right,
   nav centred in the remaining space */
.site-header .nav {
  margin-left: auto;
  margin-right: auto;
}

.site-header .theme-toggle {
  margin-left: -3px;
}

@media (max-width: 900px) {
  .site-header .nav-cta {
    margin-left: auto;
  }
}

/* light theme: the brass gradients start from a light highlight, not the dark text brass */
html[data-theme="light"] .brand-mark,
html[data-theme="light"] .primary-btn,
html[data-theme="light"] .continue-btn,
html[data-theme="light"] .secondary-btn {
  background: linear-gradient(140deg, #E3B158, #C48A1C 70%);
}

html[data-theme="light"] .scroll-progress {
  background: linear-gradient(90deg, var(--teal), #D9A23A);
}

html[data-theme="light"] .theme-toggle::before {
  background: linear-gradient(140deg, #E3B158, #C48A1C 70%);
}

html[data-theme="light"] .secondary-btn {
  background: transparent;
  color: var(--text);
}

/* mobile: the header is too tight for the switch, so it becomes a compact
   round button floating at the bottom-right corner (shows the current mode) */
@media (max-width: 620px) {
  .site-header .theme-toggle {
    position: fixed;
    right: 16px;
    bottom: calc(16px + env(safe-area-inset-bottom, 0px));
    z-index: 60;
    width: 30px;
    height: 30px;
    margin: 0;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, .35);
    background: linear-gradient(140deg, #E3B158, #C48A1C 70%) !important;
    box-shadow: 0 10px 24px -8px rgba(0, 0, 0, .5), 0 0 0 4px rgba(214, 162, 74, .14) !important;
  }

  html[data-theme="light"] .site-header .theme-toggle {
    box-shadow: 0 10px 24px -8px rgba(20, 28, 48, .4), 0 0 0 4px rgba(185, 127, 20, .12) !important;
  }

  .site-header .theme-toggle::before {
    display: none;
  }

  .site-header .theme-toggle i {
    left: 0 !important;
    right: 0 !important;
    top: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    font-size: 14px;
    color: #FFF8EA !important;
    transform: none !important;
  }

  .site-header .theme-toggle .i-sun {
    display: none !important;
  }

  html[data-theme="light"] .site-header .theme-toggle .i-moon {
    display: none !important;
  }

  html[data-theme="light"] .site-header .theme-toggle .i-sun {
    display: flex !important;
  }

  .site-header .theme-toggle:active {
    transform: scale(.94);
  }
}