/* Thon Design System tokens: sharp corners, navy + pink core palette, Room typeface family. */

@font-face {
  font-family: "Room";
  font-weight: 300;
  font-style: normal;
  font-display: swap;
  src: url("./fonts/ThonRoom-Light-Web.woff2") format("woff2"), url("./fonts/Room-Light.otf") format("opentype");
}
@font-face {
  font-family: "Room";
  font-weight: 300;
  font-style: italic;
  font-display: swap;
  src: url("./fonts/ThonRoom-LightItalic-Web.woff2") format("woff2"), url("./fonts/Room-LightItalic.otf") format("opentype");
}
@font-face {
  font-family: "Room";
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  src: url("./fonts/ThonRoom-Regular-Web.woff2") format("woff2"), url("./fonts/Room-Regular.otf") format("opentype");
}
@font-face {
  font-family: "Room";
  font-weight: 400;
  font-style: italic;
  font-display: swap;
  src: url("./fonts/ThonRoom-Italic-Web.woff2") format("woff2"), url("./fonts/Room-Italic.otf") format("opentype");
}
@font-face {
  font-family: "Room";
  font-weight: 500;
  font-style: normal;
  font-display: swap;
  src: url("./fonts/ThonRoom-Medium-Web.woff2") format("woff2"), url("./fonts/Room-Medium.otf") format("opentype");
}
@font-face {
  font-family: "Room";
  font-weight: 500;
  font-style: italic;
  font-display: swap;
  src: url("./fonts/ThonRoom-MediumItalic-Web.woff2") format("woff2"), url("./fonts/Room-MediumItalic.otf") format("opentype");
}
@font-face {
  font-family: "Room";
  font-weight: 700;
  font-style: normal;
  font-display: swap;
  src: url("./fonts/ThonRoom-Bold-Web.woff2") format("woff2"), url("./fonts/Room-Bold.otf") format("opentype");
}
@font-face {
  font-family: "Room";
  font-weight: 700;
  font-style: italic;
  font-display: swap;
  src: url("./fonts/ThonRoom-BoldItalic-Web.woff2") format("woff2"), url("./fonts/Room-BoldItalic.otf") format("opentype");
}
@font-face {
  font-family: "Room Title";
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  src: url("./fonts/ThonRoomTitling-Regular-Web.woff2") format("woff2"), url("./fonts/RoomTitle-Regular.otf") format("opentype");
}

@font-face {
  font-family: "Thon Sans";
  font-weight: 300; font-style: normal; font-display: swap;
  src: url("./fonts/ThonSans-Light-Web.woff2") format("woff2");
}
@font-face {
  font-family: "Thon Sans";
  font-weight: 300; font-style: italic; font-display: swap;
  src: url("./fonts/ThonSans-LightItalic-Web.woff2") format("woff2");
}
@font-face {
  font-family: "Thon Sans";
  font-weight: 400; font-style: normal; font-display: swap;
  src: url("./fonts/ThonSans-Regular-Web.woff2") format("woff2");
}
@font-face {
  font-family: "Thon Sans";
  font-weight: 400; font-style: italic; font-display: swap;
  src: url("./fonts/ThonSans-Italic-Web.woff2") format("woff2");
}
@font-face {
  font-family: "Thon Sans";
  font-weight: 500; font-style: normal; font-display: swap;
  src: url("./fonts/ThonSans-Medium-Web.woff2") format("woff2");
}
@font-face {
  font-family: "Thon Sans";
  font-weight: 500; font-style: italic; font-display: swap;
  src: url("./fonts/ThonSans-MediumItalic-Web.woff2") format("woff2");
}
@font-face {
  font-family: "Thon Sans";
  font-weight: 700; font-style: normal; font-display: swap;
  src: url("./fonts/ThonSans-Bold-Web.woff2") format("woff2");
}
@font-face {
  font-family: "Thon Sans";
  font-weight: 700; font-style: italic; font-display: swap;
  src: url("./fonts/ThonSans-BoldItalic-Web.woff2") format("woff2");
}

@font-face {
  font-family: "Thon Title";
  font-weight: 400; font-style: normal; font-display: swap;
  src: url("./fonts/ThonTitle-Regular-Web.woff2") format("woff2");
}

/* Self-hosted Material Symbols Outlined (Apache-2.0, see fonts/MaterialSymbolsOutlined-LICENSE.txt), full set at opsz 24 / wght 400 / FILL 0 / GRAD 0.
   Served from our origin so the preload in V2Layout lands before prerendered icons paint. */
@font-face {
  font-family: "Material Symbols Outlined";
  font-weight: 400; font-style: normal; font-display: block;
  src: url("./fonts/MaterialSymbolsOutlined.woff2") format("woff2");
}

.material-symbols-outlined {
  font-family: "Material Symbols Outlined";
  font-weight: normal;
  font-style: normal;
  font-size: 24px;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  display: inline-block;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  -webkit-font-feature-settings: "liga";
  font-feature-settings: "liga";
  -webkit-font-smoothing: antialiased;
}

:root {
  --thon-blue-900: #001E40;
  --thon-blue-800: #002855;
  --thon-blue-700: #002954;
  --thon-blue-600: #162F75;
  --thon-blue-500: #2244A7;
  --thon-blue-400: #284BAF;
  --thon-blue-300: #4C72E8;
  --thon-blue-200: #7E93CF;
  --thon-blue-100: #BED6FF;
  --thon-blue-50:  #DFEAFF;
  --thon-blue-25:  #EFF5FF;
  --thon-blue-15:  #EEF1F9;

  --pink-900: #60000D;
  --pink-800: #840B55;
  --pink-500: #F57EB6;
  --pink-100: #FCDFED;

  --hotels-red:        #D6001C;
  --hotels-red-dark:   #60000D;
  --hotels-ink:        #291A1A;
  --hotels-orange:     #EB5A2C;
  --hotels-green:      #00594C;

  --senter-black: #000000;
  --senter-white: #FFFFFF;

  --neutral-1000: #000000;
  --neutral-900:  #181716;
  --neutral-800:  #291A1A;
  --neutral-700:  #3D202E;
  --neutral-600:  #46627A;
  --neutral-500:  #7F93AA;
  --neutral-400:  #838497;
  --neutral-300:  #D9D9D9;
  --neutral-200:  #E2E1E7;
  --neutral-100:  #F7F6F3;
  --neutral-50:   #FFFFFF;

  --success: #007E45;
  --success-subtle: #E5F0EC;
  --danger:  #CC2B22;
  --danger-subtle: #FBE9E8;
  --warning: #EB5A2C;
  --info:    #2244A7;

  --fg-1: var(--thon-blue-900);
  --fg-2: var(--thon-blue-800);
  /* Secondary text: 5.2:1 on white, 4.7:1 on --bg-surface/--bg-subtle (AA needs 4.5:1). */
  --fg-3: #6B6C7E;
  --fg-hint: var(--fg-3);
  --fg-onbrand: #FFFFFF;
  --fg-link: var(--thon-blue-400);
  --fg-accent: var(--pink-800);

  --bg-canvas: #FFFFFF;
  --bg-surface: var(--neutral-100);
  --bg-subtle:  var(--thon-blue-25);
  --bg-brand:   var(--thon-blue-800);
  --bg-brand-gradient: radial-gradient(at 50% 0%, #4C72E8 0%, #002855 100%);
  --bg-accent:  var(--pink-100);
  --bg-hotels:  var(--hotels-red);

  --border-default: var(--neutral-500);
  --border-subtle:  var(--neutral-200);
  --border-strong:  var(--thon-blue-800);
  --border-onbrand: var(--thon-blue-100);

  --font-sans: "Room", "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-ui: "Thon Sans", "Room", system-ui, sans-serif;  /* buttons, nav, labels, UI chrome */
  --font-display: "Thon Title", "Room Title", system-ui, sans-serif;  /* hero titles only; sans fallback keeps a late font swap subtle */

  --tracking-default: 0.010em;
  --tracking-wide: 0.020em;
  --tracking-tight: 0;

  --fs-h1: 64px;  --lh-h1: 80px;
  --fs-h2: 32px;  --lh-h2: 40px;
  --fs-h3: 24px;  --lh-h3: 32px;
  --fs-h4: 20px;  --lh-h4: 32px;
  --fs-h5: 16px;  --lh-h5: 24px;

  --fs-preamble: 24px; --lh-preamble: 40px;
  --fs-body-lg: 20px;  --lh-body-lg: 32px;
  --fs-body:    18px;  --lh-body:    32px;
  --fs-body-sm: 16px;  --lh-body-sm: 24px;
  --fs-label:   14px;  --lh-label:   24px;
  --fs-link:    18px;  --lh-link:    32px;

  --fs-display: 128px; --lh-display: 1;

  --fs-h1-m: 40px; --lh-h1-m: 48px;
  --fs-h2-m: 24px; --lh-h2-m: 32px;
  --fs-h3-m: 20px; --lh-h3-m: 24px;

  --space-0: 0;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 40px;
  --space-8: 48px;
  --space-9: 64px;
  --space-10: 80px;
  --space-11: 100px;
  --space-12: 150px;

  --radius-none: 0;       /* DEFAULT — Thon uses sharp corners everywhere */
  --radius-pill: 9999px;  /* reserved for chips/tags only */

  --border-width: 1px;
  --border-width-emphasis: 3px;
  --border-width-alert: 4px;

  /* Thon prefers flat blocks; shadows are for hover/focus rings and dropdown panels only. */
  --shadow-0: none;
  --shadow-1: 0 1px 2px rgba(0,40,85,0.06);
  --shadow-2: 0 4px 12px rgba(0,40,85,0.08);
  --shadow-focus: 0 0 0 3px rgba(34,68,167,0.30);

  --ease-default: cubic-bezier(0.2, 0.0, 0.2, 1);
  --ease-emphasis: cubic-bezier(0.4, 0, 0.2, 1);
  --duration-snap: 120ms;
  --duration-default: 200ms;
  --duration-slow: 320ms;

  --v2-container-width: 1320px;
}

html, body {
  font-family: var(--font-sans);
  font-size: var(--fs-body-sm);
  line-height: var(--lh-body-sm);
  letter-spacing: var(--tracking-default);
  color: var(--fg-1);
  background: var(--bg-canvas);
  -webkit-font-smoothing: antialiased;
}

h1, .h1 {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: var(--fs-h1);
  line-height: var(--lh-h1);
  letter-spacing: var(--tracking-default);
  color: var(--fg-2);
  margin: 0;
}
h2, .h2 { font: 700 var(--fs-h2)/var(--lh-h2) var(--font-sans); color: var(--fg-2); margin: 0; letter-spacing: var(--tracking-default); }
h3, .h3 { font: 700 var(--fs-h3)/var(--lh-h3) var(--font-sans); color: var(--fg-2); margin: 0; letter-spacing: var(--tracking-default); }
h4, .h4 { font: 700 var(--fs-h4)/var(--lh-h4) var(--font-sans); color: var(--fg-2); margin: 0; letter-spacing: var(--tracking-default); }
h5, .h5 { font: 700 var(--fs-h5)/var(--lh-h5) var(--font-sans); color: var(--fg-2); margin: 0; letter-spacing: var(--tracking-default); }

.preamble  { font: 500 var(--fs-preamble)/var(--lh-preamble) var(--font-sans); color: var(--fg-2); }
.body-lg   { font: 400 var(--fs-body-lg)/var(--lh-body-lg) var(--font-sans); color: var(--fg-1); }
.body      { font: 400 var(--fs-body)/var(--lh-body) var(--font-sans); color: var(--fg-1); }
.body-sm   { font: 400 var(--fs-body-sm)/var(--lh-body-sm) var(--font-sans); color: var(--fg-1); }
.label     { font: 500 var(--fs-label)/var(--lh-label) var(--font-ui); color: var(--fg-2); letter-spacing: var(--tracking-wide); }
.ui        { font-family: var(--font-ui); }
.link      { font: 400 var(--fs-link)/var(--lh-link) var(--font-sans); color: var(--fg-link); text-decoration: underline; text-underline-offset: 3px; }

.display   {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: var(--fs-display);
  line-height: var(--lh-display);
  color: var(--fg-2);
  letter-spacing: 0;
}

p { margin: 0 0 var(--space-4) 0; text-wrap: pretty; }
a { color: var(--fg-link); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }

* { box-sizing: border-box; }

/* Brand-scoped theme overrides — wrap any subtree in .theme-hotels etc. */
.theme-hotels {
  --fg-2: var(--hotels-ink);
  --bg-brand: var(--hotels-red);
  --bg-brand-gradient: linear-gradient(180deg, #D6001C 0%, #60000D 100%);
  --fg-accent: var(--hotels-red);
  --border-strong: var(--hotels-ink);
}
.theme-eiendom {
  --bg-brand: var(--thon-blue-500);
}
.theme-bolig {
  --fg-accent: var(--pink-800);
  --bg-brand: var(--pink-500);
}
.theme-senter {
  --bg-brand: var(--senter-black);
  --fg-2: var(--senter-black);
}
