/* Robin Warner Neurology - minimal, accessible, responsive */

/* Design tokens (derived from the logo palette) */
:root{
  --ink:#3E3F3F;
  --muted:#6B7280;
  --subtle:#A9B4BD;
  --bg:#ffffff;
  --surface:#F7F8FA;
  --border:rgba(62,63,63,.16);

  --brand-blue:#6599D2;
  --brand-periwinkle:#747CC2;
  --brand-purple:#9E72C2;

  --radius:18px;
  --shadow: 0 10px 30px rgba(20,20,20,.08);
  --shadow-sm: 0 6px 18px rgba(20,20,20,.08);

  --max: 1120px;
  --gutter: 22px;
  --focus: 0 0 0 4px rgba(101,153,210,.35);
}

/* Better box sizing */
*,*::before,*::after{box-sizing:border-box;}
html{color-scheme: light;}
body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji","Segoe UI Emoji";
  color:var(--ink);
  background:var(--bg);
  line-height:1.5;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

img{max-width:100%; height:auto;}
a{color:inherit; text-decoration-thickness: 2px; text-underline-offset: 3px;}
a:hover{color:var(--brand-blue);}
a:focus-visible{outline:none; box-shadow: var(--focus); border-radius: 10px;}

.orcid-link{
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.orcid-logo{
  height: 24px;
  width: auto;
  display: block;
}

p{margin:0 0 1rem;}
ul,ol{margin:0 0 1rem 1.2rem;}
li{margin:.35rem 0;}

small{color:var(--muted);}

.skip-link{
  position:absolute;
  left:-9999px;
  top:10px;
  padding:.75rem 1rem;
  background:var(--bg);
  border:1px solid var(--border);
  border-radius: 999px;
  z-index: 1000;
}
.skip-link:focus{left:10px; box-shadow: var(--focus);}

/* Layout primitives */
.container{
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.section{padding: 56px 0;}
.section.surface{background: var(--surface);}
.grid{
  display:grid;
  gap: 22px;
}
@media (min-width: 860px){
  .grid.cols-2{grid-template-columns: 1.1fr .9fr;}
  .grid.cols-3{grid-template-columns: repeat(3, 1fr);}
}

/* Header */
.topbar{
  background: linear-gradient(90deg, rgba(101,153,210,.14), rgba(158,114,194,.14));
  border-bottom: 1px solid var(--border);
}
.topbar p{
  margin:0;
  padding: 10px 0;
  font-size: 14px;
  color: rgba(62,63,63,.9);
  text-align: center;
}
.header{
  position: sticky;
  top: 0;
  z-index: 999;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.header-inner{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding: 14px 0;
  gap: 14px;
}
.brand{
  display:flex;
  align-items:center;
  gap: 12px;
  text-decoration:none;
}
.brand img{
  width: 240px;
  height: auto;
}
.brand .wordmark{
  display:none; /* logo contains wordmark */
}
.nav{
  display:flex;
  align-items:center;
  gap: 16px;
}
.nav a{
  text-decoration:none;
  padding: 10px 10px;
  border-radius: 12px;
  font-size: 15px;
  color: rgba(62,63,63,.92);
}
.nav a[aria-current="page"]{
  background: rgba(101,153,210,.12);
  border: 1px solid rgba(101,153,210,.18);
}
.nav a:hover{background: rgba(158,114,194,.10);}
.nav .cta{
  display:inline-flex;
  align-items:center;
  gap: 10px;
  background: linear-gradient(90deg, rgba(101,153,210,.95), rgba(158,114,194,.95));
  color: #fff;
  padding: 10px 14px;
  border-radius: 999px;
  border: none !important;
  box-shadow: var(--shadow-sm);
  transition: background 0.2s ease, box-shadow 0.2s ease;
}
.nav .cta[aria-current="page"]{
  background: linear-gradient(90deg, rgba(101,153,210,.95), rgba(158,114,194,.95));
  border: none !important;
}
.nav .cta:hover{
  background: linear-gradient(90deg, rgba(85,135,190,1), rgba(140,120,180,1));
  box-shadow: 0 8px 24px rgba(20,20,20,.15);
}
.nav .cta:active{
  background: linear-gradient(90deg, rgba(75,125,180,1), rgba(130,110,170,1));
  box-shadow: 0 4px 12px rgba(20,20,20,.12);
}
.nav .portal{
  border: 1px solid var(--border);
  background: #fff;
}
.external-icon{
  display: inline-block;
  width: 16px;
  height: 16px;
  margin-left: -2px;
  vertical-align: middle;
}

/* Mobile nav */
.menu-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background:#fff;
}
.menu-btn:focus-visible{outline:none; box-shadow: var(--focus);}
.menu{
  display:none;
}
@media (max-width: 980px){
  .nav{display:none;}
  .menu{display:block; position:relative;}
  .menu-panel{
    position:absolute;
    right:0;
    top: 52px;
    width: min(92vw, 360px);
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 10px;
    display:none;
  }
  .menu-panel a{
    display:block;
    padding: 12px 12px;
    border-radius: 14px;
    text-decoration:none;
    color: rgba(62,63,63,.92);
  }
  .menu-panel a:hover{background: rgba(101,153,210,.10);}
  .menu-panel .cta{
    color:#fff;
    background: linear-gradient(90deg, rgba(101,153,210,.95), rgba(158,114,194,.95));
    margin-top: 6px;
    text-align:center;
  }
}

/* Typography */
h1,h2,h3{
  font-family: ui-serif, Georgia, "Times New Roman", Times, serif;
  margin: 0 0 12px;
  line-height: 1.12;
  letter-spacing: .2px;
}
h1{font-size: clamp(34px, 4vw, 48px);}
h2{font-size: clamp(26px, 3vw, 34px);}
h3{font-size: 20px; font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial;}
.kicker{
  font-size: 13px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: rgba(62,63,63,.75);
}

/* Cards */
.card{
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: 0 1px 0 rgba(0,0,0,.03);
}
.card.soft{background: rgba(101,153,210,.06);}
.card h3{margin:0 0 8px;}
.card.condition-card{
  border-left: 4px solid;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.card.condition-card:hover{
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}
.card.condition-card.blue{
  border-left-color: var(--brand-blue);
  background: linear-gradient(to right, rgba(101,153,210,.05), #fff);
}
.card.condition-card.periwinkle{
  border-left-color: var(--brand-periwinkle);
  background: linear-gradient(to right, rgba(116,124,194,.05), #fff);
}
.card.condition-card.purple{
  border-left-color: var(--brand-purple);
  background: linear-gradient(to right, rgba(158,114,194,.05), #fff);
}
.badge{
  display:inline-flex;
  align-items:center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 13px;
  border: 1px solid var(--border);
  background: #fff;
}
.badge.dot::before{
  content:"";
  width: 9px;
  height: 9px;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--brand-blue), var(--brand-purple));
}

/* Buttons */
.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 999px;
  border: 1px solid transparent;
  text-decoration:none;
  font-weight: 600;
}
.btn.primary{
  color:#fff;
  background: linear-gradient(90deg, rgba(101,153,210,.98), rgba(158,114,194,.98));
  box-shadow: var(--shadow-sm);
}
.btn.secondary{
  background:#fff;
  border-color: var(--border);
}
.btn:focus-visible{outline:none; box-shadow: var(--focus);}

/* Hero */
.hero{
  padding: 44px 0 20px;
}
.hero .lead{
  font-size: 18px;
  color: rgba(62,63,63,.86);
  max-width: 68ch;
}
.hero-actions{
  display:flex;
  flex-wrap:wrap;
  gap: 12px;
  margin-top: 18px;
}

/* Logos */
.logos{
  display:flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items:center;
}
.logo-tile{
  display:flex;
  align-items:center;
  justify-content:center;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background:#fff;
  height: 81px;
}
.logo-tile img{max-height: 58px; width:auto; object-fit: contain;}
.logo-group{display:grid; gap:10px;}
.logo-group .label{font-size: 18px; color: rgba(62,63,63,.74);}

/* Footer */
.footer{
  border-top: 1px solid var(--border);
  padding: 28px 0;
  background: #fff;
}
.footer-grid{
  display:grid;
  gap: 18px;
}
@media (min-width: 860px){
  .footer-grid{grid-template-columns: 1.2fr .8fr .8fr;}
}
.footer a{color: rgba(62,63,63,.88); text-decoration:none;}
.footer a:hover{text-decoration:underline;}
.footer .small{font-size: 14px; color: rgba(62,63,63,.70);}
.footer .links{display:grid; gap:8px;}
hr.sep{border:none; border-top:1px solid var(--border); margin: 14px 0;}

/* Tables */
table{border-collapse: collapse; width: 100%;}
th,td{padding: 12px; text-align:left; border-bottom: 1px solid var(--border);}
th{font-weight: 700; color: rgba(62,63,63,.9);}
table td.muted{color: #A9B4BD !important;}

/* Harvey balls */
.harvey-ball{
  display: inline-block;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 3px solid #22c55e;
  position: relative;
  vertical-align: middle;
  flex-shrink: 0;
  box-sizing: border-box;
  background-clip: padding-box;
}
.harvey-ball.yes{
  background: #22c55e;
  border-color: #22c55e;
}
.harvey-ball.partial{
  background: conic-gradient(from 90deg, #22c55e 0deg, #22c55e 180deg, transparent 180deg, transparent 360deg);
  border-color: #22c55e;
}
.harvey-ball.no{
  background: transparent;
  border-color: #22c55e;
}
.comparison-table{
  margin-top: 24px;
  overflow-x: auto;
}

/* Two-column layout used on booking page: left column ~50%, right column ~50% */
.two-col{
  display:flex;
  gap: 22px;
  align-items:flex-start;
}
.two-col .left{flex: 0 0 66%;}
.two-col .right{flex: 0 0 34%; min-width:220px;}
.two-col .addr-link{display:flex; align-items:center; gap:12px; text-decoration: none; line-height: normal}
.two-col .addr-link .addr-text{ text-decoration: none; }
.addr-note{ text-decoration: none; color: var(--muted); display:block;}

/* Three-column layout used on booking page */
.three-col{
  display:flex;
  gap: 22px;
  align-items:flex-start;
}
.three-col .left{flex: 1 1 50%;}
.three-col .middle{flex: 0 0 25%; min-width:220px;}
.three-col .right{flex: 0 0 25%; min-width:220px;}
.three-col .addr-link{display:flex; align-items:center; gap:12px; text-decoration: none; line-height: normal}
.three-col .addr-link .addr-text{ text-decoration: none; }

/* Address block: title sits above the address text (not part of the link).
   Use a two-column grid so the title aligns with the address text (not the icon). */
.addr-block{
  display:grid;
  grid-template-columns: 26px 1fr;
  gap:12px;
  align-items:start;
}
.addr-title{grid-column:2; display:block; font-weight:700; margin-bottom:4px;}
.addr-link{grid-column:1 / span 2; display:flex; align-items:center; gap:12px; text-decoration: underline; text-underline-offset: 3px; line-height: normal}
.addr-link .addr-text{display:block;}
.addr-note{ text-decoration: none; color: var(--muted); display:block;}

@media (max-width: 860px){
  .addr-block{grid-template-columns: 1fr;}
  .addr-title{grid-column:auto;}
  .addr-link{grid-column:auto;}
}

@media (max-width: 860px){
  .two-col{flex-direction:column;}
  .two-col .left, .two-col .right{flex:none; width:100%;}
  .two-col .right{min-width:auto;}
  /* make iframe shorter on small screens */
  .two-col .right .embed iframe{height:600px;}

  .three-col{flex-direction:column;}
  .three-col .left, .three-col .middle, .three-col .right{flex:none; width:100%;}
  .three-col .middle, .three-col .right{min-width:auto;}
}
.comparison-table table{
  min-width: 600px;
}
.comparison-table th{
  padding: 20px 16px;
  font-size: 18px;
  border-bottom: 2px solid var(--border);
}
.comparison-table th:first-child{
  max-width: 400px;
}
.comparison-table td{
  padding: 12px 16px;
  vertical-align: middle;
  font-size: 17px;
}
.comparison-table tbody td:first-child{
  font-size: 18px;
  font-weight: 500;
  max-width: 400px;
}
.comparison-table tr:last-child td{
  border-bottom: none;
}
.comparison-table tr.sub-header th{
  background: rgba(101,153,210,.08);
  font-weight: 600;
  font-size: 16px;
  padding: 10px 16px;
  border-top: 2px solid var(--border);
  border-bottom: 1px solid var(--border);
  color: rgba(62,63,63,.9);
  text-align: left;
}
.comparison-table tbody > tr:first-child.sub-header th{
  border-top: none;
}
.harvey-cell{
  text-align: center;
  width: 180px;
  min-width: 160px;
}

/* Mobile responsive adjustments for comparison table */
@media (max-width: 480px){
  .comparison-table{
    overflow-x: visible;
  }
  .comparison-table table{
    min-width: 100%;
    width: 100%;
  }
  .comparison-table th{
    padding: 12px 8px;
    font-size: 14px;
  }
  .comparison-table th:first-child{
    max-width: none;
    width: auto;
  }
  .comparison-table td{
    padding: 10px 8px;
    font-size: 14px;
  }
  .comparison-table tbody td:first-child{
    font-size: 14px;
    max-width: none;
    width: auto;
  }
  .comparison-table tr.sub-header th{
    font-size: 13px;
    padding: 8px;
  }
  .harvey-cell{
    width: auto;
    min-width: 80px;
    max-width: 100px;
  }
  .harvey-ball{
    width: 24px;
    height: 24px;
    border-width: 2px;
  }
}

/* Embeds */
.embed{
  border: none;
  border-radius: var(--radius);
  overflow: hidden;
  background:#fff;
  min-height: 640px;
}
.embed iframe{
  width: 100%;
  height: 80vh;
  min-height: 640px;
  border: 0;
}

/* Small place/location icon used next to address links */
.addr-link{
  display:inline-flex;
  align-items:stretch;
  gap:8px;
}
.addr-text{
  display:flex;
  flex-direction:column;
  justify-content:center;
}
.addr-note{
  color: rgba(62,63,63,.75);
}
.place-icon{
  width:auto;
  height:42px;
  display:block;
  flex-shrink: 0;
  color: var(--brand-blue);
  align-self:center;
  max-height:56px;
}
@media (max-width: 480px){
  .place-icon{width:auto; max-height:42px}
}

/* Accessibility helpers */
.visually-hidden{
  position:absolute !important;
  height:1px; width:1px;
  overflow:hidden;
  clip:rect(1px,1px,1px,1px);
  white-space:nowrap;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce){
  *{scroll-behavior:auto !important; transition:none !important; animation:none !important;}
}
