/* ============================================================
  Othisis Medtech — home
   Palette pulled from the mark: signal green -> deep clinical navy
   ============================================================ */

:root{
  --green-500: #4FB377;
  --green-600: #3A9A63;
  --teal-500:  #2E8C74;
  --navy-900:  #003F84;
  --navy-950:  #062647;
  --ink:       #0B2036;
  --muted:     #5C7086;
  --bg:        #F5FAF7;
  --card-bg:   #FFFFFF;
  --line:      #E1EAE4;
  --ring: 0 0 0 3px rgba(79,179,119,.35);

  --font-display: "Sora", ui-sans-serif, system-ui, sans-serif;
  --font-body: "Inter", ui-sans-serif, system-ui, sans-serif;

  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 10px;
}

*{ box-sizing: border-box; }

html, body{
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
}

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

button{ font: inherit; color: inherit; }

:focus-visible{
  outline: none;
  box-shadow: var(--ring);
  border-radius: var(--radius-sm);
}

.page{
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(1100px 420px at 85% -10%, rgba(79,179,119,.10), transparent 60%),
    radial-gradient(900px 380px at -10% 0%, rgba(0,63,132,.07), transparent 55%),
    var(--bg);
}

/* ===================== Header ===================== */

.topbar{
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px clamp(20px, 5vw, 56px) 0;
}

.brand-logo{
  height: 34px;
  width: auto;
  display: block;
}

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

.icon-btn{
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--card-bg);
  color: var(--navy-900);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: border-color .15s ease, transform .15s ease;
}
.icon-btn svg{ width: 19px; height: 19px; }
.icon-btn:hover{ border-color: var(--green-500); transform: translateY(-1px); }

.avatar-btn{
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  display: grid;
  place-items: center;
  cursor: pointer;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: .02em;
  color: #fff;
  background: linear-gradient(135deg, var(--green-500), var(--navy-900));
  transition: transform .15s ease, box-shadow .15s ease;
}
.avatar-btn:hover{ transform: translateY(-1px); box-shadow: 0 6px 16px rgba(0,63,132,.25); }

/* ===================== Hero ===================== */

.hero{
  padding: clamp(28px, 6vw, 52px) clamp(20px, 5vw, 56px) 6px;
  max-width: 720px;
}

.eyebrow{
  margin: 0 0 10px;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--green-600);
}

.hero h1{
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(30px, 5vw, 44px);
  line-height: 1.08;
  letter-spacing: -0.01em;
  color: var(--navy-950);
}

.hero-sub{
  margin: 16px 0 0;
  max-width: 46ch;
  font-size: 16px;
  line-height: 1.55;
  color: var(--muted);
}

/* signature waveform accent */
.hero-wave{
  display: block;
  width: min(320px, 60%);
  height: 34px;
  margin-top: 22px;
}
.wave-bars line{
  stroke: var(--green-500);
  transform-origin: center;
  animation: pulse 2.4s ease-in-out infinite;
}
.wave-bars line:nth-child(3n){ stroke: var(--navy-900); }
.wave-bars line:nth-child(3n+1){ stroke: var(--teal-500); }
.wave-bars line:nth-child(2n){ animation-delay: -0.6s; }
.wave-bars line:nth-child(5n){ animation-delay: -1.2s; }
.wave-bars line:nth-child(7n){ animation-delay: -1.8s; }

@keyframes pulse{
  0%, 100%{ transform: scaleY(.55); opacity: .55; }
  50%{ transform: scaleY(1); opacity: 1; }
}

@media (prefers-reduced-motion: reduce){
  .wave-bars line{ animation: none; transform: scaleY(.85); opacity: .85; }
}

/* ===================== Action grid ===================== */

.actions{ 
  flex: 1;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  padding: 22px clamp(20px, 5vw, 56px) clamp(32px, 6vw, 56px);
  max-width: 1040px;
}

.scribe-menu-wrap{
  position: relative;
  height: 130px;
  align-self: start;
}

.scribe-menu-wrap .card{
  width: 100%;
}

.scribe-menu{
  position: absolute;
  top: calc(100% - 10px);
  left: 16px;
  right: 16px;
  z-index: 10;
  display: grid;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--card-bg);
  box-shadow: 0 14px 28px rgba(6,38,71,.16);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-6px);
  transition: opacity .15s ease, transform .15s ease;
}

.scribe-menu-wrap:hover .scribe-menu,
.scribe-menu-wrap:focus-within .scribe-menu{
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.scribe-menu a{
  padding: 9px 10px;
  border-radius: 7px;
  color: var(--navy-950);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}

.scribe-menu a:hover,
.scribe-menu a:focus-visible{
  background: var(--bg);
  color: var(--green-600);
}

.card{
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  text-align: left;
  background: var(--card-bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 22px;
  height: 120px;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.card:hover{
  transform: translateY(-3px);
  border-color: var(--green-500); 
  box-shadow: 0 14px 32px rgba(6,38,71,.10);
  background: linear-gradient(135deg, var(--green-500) 0%, var(--teal-500) 55%, var(--navy-900) 100%);
}
.card:hover .card-title,
.card:hover .card-desc{
  color: #fff;
}
.card:active{ transform: translateY(-1px); }

.card-icon{
  flex: none;
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  display: grid;
  place-items: center;
  background: linear-gradient(150deg, rgba(79,179,119,.14), rgba(0,63,132,.10));
  color: var(--navy-900);
}
.card-icon svg{ width: 26px; height: 26px; }

.card-body{
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-right: 22px;
}

.card-title{
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 17px;
  color: var(--navy-950);
  transition: color .18s ease;
}

.card-desc{
  font-size: 14px;
  line-height: 1.5;
  color: var(--muted);
  transition: color .18s ease;
}

.card-go{
  position: absolute;
  top: 22px;
  right: 20px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--muted);
  border: 1px solid var(--line);
  transition: color .15s ease, border-color .15s ease, background .15s ease;
}
.card-go svg{ width: 14px; height: 14px; }
.card:hover .card-go{
  color: #fff;
  border-color: transparent;
  background: var(--green-500);
}

/* ===================== Toast ===================== */

.toast{
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translate(-50%, 16px);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  background: var(--navy-950);
  color: #fff;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  box-shadow: 0 12px 30px rgba(6,38,71,.35);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
  z-index: 40;
}
.toast.is-visible{
  opacity: 1;
  transform: translate(-50%, 0);
}
.toast-spinner{
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,.35);
  border-top-color: var(--green-500);
  animation: spin .7s linear infinite;
}
@keyframes spin{ to{ transform: rotate(360deg); } }

/* ===================== Responsive ===================== */

@media (max-width: 720px){
  .actions{
    grid-template-columns: 1fr;
  }
  .card-body{ padding-right: 32px; }
  .scribe-menu{ left: 10px; right: 10px; }
}

@media (max-width: 420px){
  .topbar{ padding-top: 18px; }
  .card{ padding: 18px; gap: 14px; }
  .card-icon{ width: 46px; height: 46px; }
}